English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 03 February 2018, 20:30   #61
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
cmake-amiga -DDEPS_DIR=/opt/m68k-amigaos -DOPENGL_gl_LIBRARY=""
Marlon_ is offline  
Old 03 February 2018, 20:39   #62
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
To list all CMake variables: cmake -LAH .
Marlon_ is offline  
Old 03 February 2018, 20:40   #63
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
Quote:
Originally Posted by Marlon_ View Post
#1) I saw the answers added above

is there a cmake option to list all those defintions ( -D .... ) for the given CMakeLists.txt?
Quote:
Originally Posted by Marlon_ View Post
To list all CMake variables: cmake -LAH .
ok, thanks

#1) cmake howto

Last edited by emufan; 03 February 2018 at 20:46.
emufan is offline  
Old 03 February 2018, 20:44   #64
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
I'm getting loads of errors like these when trying to compile OpenXcom:
Code:
In file included from /opt/m68k-amigaos/include/yaml-cpp/yaml.h:22:0,
                 from /home/marlon/tmp/Programming/Amiga/Projects/OpenXcom/src/Engine/OptionInfo.h:20,
                 from /home/marlon/tmp/Programming/Amiga/Projects/OpenXcom/src/Engine/Options.h:23,
                 from /home/marlon/tmp/Programming/Amiga/Projects/OpenXcom/src/main.cpp:24:
/opt/m68k-amigaos/include/yaml-cpp/node/emit.h:26:28: error: conflicting declaration of C function 'std::ostream& YAML::operator<<(std::ostream&, const YAML::Node&)'
 YAML_CPP_API std::ostream& operator<<(std::ostream& out, const Node& node);
                            ^~~~~~~~
In file included from /opt/m68k-amigaos/include/yaml-cpp/yaml.h:11:0,
                 from /home/marlon/tmp/Programming/Amiga/Projects/OpenXcom/src/Engine/OptionInfo.h:20,
                 from /home/marlon/tmp/Programming/Amiga/Projects/OpenXcom/src/Engine/Options.h:23,
                 from /home/marlon/tmp/Programming/Amiga/Projects/OpenXcom/src/main.cpp:24:
/opt/m68k-amigaos/include/yaml-cpp/emitter.h:177:17: note: previous declaration 'YAML::Emitter& YAML::operator<<(YAML::Emitter&, bool)'
 inline Emitter& operator<<(Emitter& emitter, bool v) {
Marlon_ is offline  
Old 03 February 2018, 20:49   #65
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
hmm, still playing with cmake.
but a strange thing, if you see header files from same project fighting with eachother
emufan is offline  
Old 03 February 2018, 20:51   #66
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
hmm, still playing with cmake.
but a strange thing, if you see header files from same project fighting with eachother
Yeah, but I think it might have to do with c++ standard, i think YAML v0.6.0 uses c++11 standard. Will try again with -std=c++11 defined

EDIT:
No dice
Marlon_ is offline  
Old 03 February 2018, 21:18   #67
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
The m68k compiler doesn't seem to like the yaml-includes at all. Thousands of errors.
Marlon_ is offline  
Old 03 February 2018, 21:27   #68
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I struggle with the defintions for OpenXcom:
Code:
cmake.exe CMakeLists.txt -DCMAKE_SYSTEM_NAME=Generic \
-DSDLGFX_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDLGFX_LIBRARY="/cygdrive/d/SDL/lib/libSDL_gfx.a" \
-DSDLIMAGE_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDLIMAGE_LIBRARY="/cygdrive/d/SDL/lib/libSDL_image.a" \
-DSDLMAIN_LIBRARY="/cygdrive/d/SDL/lib/libSDL_1.2.15-AMMX-WIP.a" \
-DSDLMIXER_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDLMIXER_LIBRARY="/cygdrive/d/SDL/lib/libSDL_mixer.a" \
-DSDL_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDL_LIBRARY="/cygdrive/d/SDL/lib/libSDL_1.2.15-AMMX-WIP.a;/cygdrive/d/SDL/lib/libSDL_1.2.15-AMMX-WIP.a" \
-DYAMLCPP_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL/yaml-cpp" \
-DYAMLCPP_LIBRARY="/cygdrive/d/SDL/lib/libyaml-cpp.a"
do you use something like that to make it "configure" ?
emufan is offline  
Old 03 February 2018, 21:30   #69
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
I struggle with the defintions for OpenXcom:
Code:
cmake.exe CMakeLists.txt -DCMAKE_SYSTEM_NAME=Generic \
-DSDLGFX_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDLGFX_LIBRARY="/cygdrive/d/SDL/lib/libSDL_gfx.a" \
-DSDLIMAGE_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDLIMAGE_LIBRARY="/cygdrive/d/SDL/lib/libSDL_image.a" \
-DSDLMAIN_LIBRARY="/cygdrive/d/SDL/lib/libSDL_1.2.15-AMMX-WIP.a" \
-DSDLMIXER_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDLMIXER_LIBRARY="/cygdrive/d/SDL/lib/libSDL_mixer.a" \
-DSDL_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL" \
-DSDL_LIBRARY="/cygdrive/d/SDL/lib/libSDL_1.2.15-AMMX-WIP.a;/cygdrive/d/SDL/lib/libSDL_1.2.15-AMMX-WIP.a" \
-DYAMLCPP_INCLUDE_DIR="/cygdrive/d/SDL/include/SDL/yaml-cpp" \
-DYAMLCPP_LIBRARY="/cygdrive/d/SDL/lib/libyaml-cpp.a"
do you use something like that to make it "configure" ?
All you need to do is this: cmake-amiga -DDEPS_DIR=/opt/m68k-amigaos -DOPENGL_gl_LIBRARY=""

obviously /opt/m68k-amigaos should be replaced with your path.

EDIT:
Also, make a folder called pkgconfig in your prefix lib folder.

Create a file called sdl.pc in that pkgconfig folder and write this to the file:
Code:
prefix=/opt/m68k-amigaos
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=/opt/m68k-amigaos/include

Name: SDL
Description: drawing and graphical effects extension for SDL
Version: 1.2.15
Libs: -L${libdir} -lSDL
Cflags: -I${includedir}/SDL
Repeat this for all your libs.

Make sure that your cmake script looks like this:
Code:
#!/bin/bash
export CXXFLAGS="-noixemul -m68040 -mhard-float -fpermissive -Os -std=c++11 -DAMIGA -D__AMIGA__"
export CFLAGS="-noixemul -m68040 -mhard-float -fpermissive -Os -DAMIGA -D__AMIGA__"
export CC=m68k-amigaos-gcc
export CXX=m68k-amigaos-g++
export CPP=m68k-amigaos-cpp
export PKG_CONFIG_LIBDIR=/opt/m68k-amigaos/lib/pkgconfig
cmake .. -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_INSTALL_PREFIX=/opt/m68k-amigaos "$@"
And of course, replace with the proper prefix-path
Marlon_ is offline  
Old 03 February 2018, 21:34   #70
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
All you need to do is this: cmake-amiga -DDEPS_DIR=/opt/m68k-amigaos -DOPENGL_gl_LIBRARY=""

obviously /opt/m68k-amigaos should be replaced with your path.
*gosh* will try, but my sdl/lib stuff is in a different location
Quote:
Originally Posted by Marlon_ View Post
The m68k compiler doesn't seem to like the yaml-includes at all. Thousands of errors.
you may try yaml-cpp 0.3.0

#1) *argh* find_package ( Yaml_cpp 0.5.0) - so 0.3.0 is a nogo.
emufan is offline  
Old 03 February 2018, 21:36   #71
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
you may try yaml-cpp 0.3.0
yaml v0.3.0 uses boost, which is a no-go.
Marlon_ is offline  
Old 03 February 2018, 21:39   #72
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
I'm making sure all my includes and my libs are within the prefix so it works with ease.
Marlon_ is offline  
Old 03 February 2018, 22:00   #73
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
yaml v0.3.0 uses boost, which is a no-go.
I did read that, but dunno what it is, doesnt matter, since OpenXcom want at least 0.5.0 (CMakeLists.txt)
Quote:
Originally Posted by Marlon_ View Post
I'm making sure all my includes and my libs are within the prefix so it works with ease.
since I have 3 different toolchains, I made a extra folder for selfmade libs and includes, thats easier,
but cannot find an option to make that location included with cmake setup
will try the export CXXFLAGS/LDFLAGS definition later.

#1) did some copy/paste of the of the includes/libs and I get those for a start (0%):
Code:
/tmp/OpenXcom-master/src/Engine/CrossPlatform.h:83:12:
 error: ‘wstring’ is not a member of ‘std’
  std::pair<std::wstring, std::wstring> timeToString(time_t time);
            ^~~
...
need a break now, will do something else, my eyes hurts
emufan is offline  
Old 09 February 2018, 04:25   #74
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 676
Quote:
Originally Posted by emufan View Post
I did read that, but dunno what it is, doesnt matter, since OpenXcom want at least 0.5.0 (CMakeLists.txt)

since I have 3 different toolchains, I made a extra folder for selfmade libs and includes, thats easier,
but cannot find an option to make that location included with cmake setup
will try the export CXXFLAGS/LDFLAGS definition later.

#1) did some copy/paste of the of the includes/libs and I get those for a start (0%):
Code:
/tmp/OpenXcom-master/src/Engine/CrossPlatform.h:83:12:
 error: ‘wstring’ is not a member of ‘std’
  std::pair<std::wstring, std::wstring> timeToString(time_t time);
            ^~~
...
need a break now, will do something else, my eyes hurts

Wait I am baffled. Are we still talking about the OP or we have moved in a complete different direction all together?
xboxown is offline  
Old 09 February 2018, 04:37   #75
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I think the aim is still openXcom. the yaml library we could build - not much, but a start.
I was in hope grelbfarlk would give it a try and give some hints, if he succeeds

i'll try these days again, maybe we can make it build somehow
emufan is offline  
Old 09 February 2018, 07:00   #76
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 676
Quote:
Originally Posted by emufan View Post
i think the aim is still openxcom. The yaml library we could build - not much, but a start.
I was in hope grelbfarlk would give it a try and give some hints, if he succeeds

i'll try these days again, maybe we can make it build somehow
I am in!!
xboxown is offline  
Old 10 February 2018, 00:06   #77
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by emufan View Post
I think the aim is still openXcom. the yaml library we could build - not much, but a start.
I was in hope grelbfarlk would give it a try and give some hints, if he succeeds

i'll try these days again, maybe we can make it build somehow
Sorry I haven't really tried this since it is CPP and Morgoth's 2.95.4 C++ is the newest one I can try, then I got discouraged by the YAML stuff...
grelbfarlk is offline  
Old 10 February 2018, 00:24   #78
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
np. for the yaml library you may try my makefile, if you get stcuk with the cmake stuff.

what I almost forgot, some lines above, Marlon did try already to start
a build of openxcom and he run into trouble with conflicting include
files from the yaml pack :/

@xboxown: i'll try but it may fail, we'll see the result later.
emufan is offline  
Old 10 February 2018, 01:20   #79
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by emufan View Post
np. for the yaml library you may try my makefile, if you get stcuk with the cmake stuff.

what I almost forgot, some lines above, Marlon did try already to start
a build of openxcom and he run into trouble with conflicting include
files from the yaml pack :/

@xboxown: i'll try but it may fail, we'll see the result later.
Thanks for the makefile but it needs version gcc4+ looking for <array> and <limits> which are not in my 2.95.4 includes, they are in the 4.4.5 though but I can't use that version.
grelbfarlk is offline  
Old 10 February 2018, 01:51   #80
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
oh, ok, too bad. :/
but whats's wrong with the 4.4.5 version?
emufan is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
emufan can you please port this to Amiga!!? xboxown Coders. C/C++ 93 29 November 2017 09:06
Just curious; Graphics Card Sim085 support.Hardware 31 12 October 2017 15:27
Curious about Natami Pat the Cat Amiga scene 13 07 January 2017 22:16
Hey hey, new guy here... CarlosTex Member Introductions 4 05 August 2011 01:29
hey hey 16k Amiga1992 Nostalgia & memories 5 16 August 2006 22:26

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:33.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.55826 seconds with 14 queries