Compilation on Windows / CrossCompile
Compilation on Windows / CrossCompile
The compilation on Windows is broken since the r898. The allagro headers for Windows in the trunk are supposed to be for Visual Studio and not MinGW (houray for Allegro to have to launch an ugly and stupid batch script to fix the headers...).
Sorry for the disagreement, It will be fixed in a few revisions. I am still preparing TA3D for compiling with Visual Studio but don't worry the compatibility with MinGW will be kept.
In this way, it would be great to avoid complex nested if..else. Anyway they can often be replaced by a better code design.
Sorry for the disagreement, It will be fixed in a few revisions. I am still preparing TA3D for compiling with Visual Studio but don't worry the compatibility with MinGW will be kept.
In this way, it would be great to avoid complex nested if..else. Anyway they can often be replaced by a better code design.
Damien Gerard
Ta3d & Yuni Developer
Ta3d & Yuni Developer
VS6 support - yeah its broken, very broken.shaddim wrote:Hello together,
tried to compile TA3d test 8 under windows with VS ... and up to now i was not very successful (endless header errors...).... what's the status about VS support?
greetings
But mingw works great though.
Don't just look at the future through a window.
Open a door and go there.
http://ta3d.freedoors.org
http://www.freedoors.org
http://baencd.freedoors.org
Open a door and go there.
http://ta3d.freedoors.org
http://www.freedoors.org
http://baencd.freedoors.org
hello together,
First to all, i'm a pretty unexpierienced in solving unix'oid build problems, but i switched to mingw, to the prepacked version of Doors, MinGW-Ta3d.7z, which i found on his side. (Thank you!)
what i did:
exchanged the ta3d v4.2 src against, the actual one v5.0 test 9
installed cmake into the mingw folder
cmake -G "MinGW Makefiles" worked on after some tries
the .\configure hint was not working, because an configure script was not found.
'mingw32-make all', was able to build until the fmod problem mentioned by doors on his page:
/home/Sources/ta3d
$ mingw32-make all
[ 3%] Built target fileformats
[ 4%] Built target logs
[ 5%] Built target i18n
[ 8%] Built target threads
[ 18%] Built target misc
[ 23%] Built target 3dtoolbox
[ 24%] Built target tdf
[ 25%] Built target ta3dmath
[ 28%] Built target tajpeg
[ 34%] Built target gui
[ 43%] Built target gfx
[ 45%] Built target particles
[ 50%] Built target ingame
[ 51%] Built target audio
[ 53%] Built target debuginfos
[ 54%] Built target console
[ 55%] Built target oldgui
[ 57%] Built target converters
[ 59%] Built target hpi
[ 60%] Built target stdafx
Linking CXX executable ..\3dmeditor.exe
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
..\bin\libs\Windows\libaudio.a(manager.cpp.obj): In function `ZNSt6vectorIPN4TA3 D5Audio7Manager12PlaylistItemESaIS4_EE13_M_insert_auxEN9__gnu_cxx17__normal_iter atorIPS4_S6_EERKS4_':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allo cator.h:(.text+0x27): undefined reference to `FMOD_Channel_Stop@4'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allo cator.h:(.text+0x35): undefined reference to `FMOD_Sound_Release@4'
..\bin\libs\Windows\libaudio.a(manager.cpp.obj): In function `ZN4TA3D5Audio7Mana ger9stopMusicEv':
C:/MinGW/home/Sources/ta3d/src/sounds/manager.cpp:438: undefined reference to `F MOD_Channel_Stop@4'
C:/MinGW/home/Sources/ta3d/src/sounds/manager.cpp:439: undefined reference to `F MOD_Sound_Release@4'
<snip>
collect2: ld returned 1 exit status
mingw32-make[2]: *** [3dmeditor.exe] Error 1
mingw32-make[1]: *** [src/CMakeFiles/3dmeditor.dir/all] Error 2
mingw32-make: *** [all] Error 2
looks for me like an linking error against c++ mangled functions,so i checked the fmodex.a etc. was in place... but not mentioned in the make rules here 'src/CMakeFiles/3dmeditor.dir/' so i added it, but helps not....
other theory: fmod version change? compiler discrepancy -> have to build fmod myself with my installed gcc?
thank you for suggestions!
First to all, i'm a pretty unexpierienced in solving unix'oid build problems, but i switched to mingw, to the prepacked version of Doors, MinGW-Ta3d.7z, which i found on his side. (Thank you!)
what i did:
exchanged the ta3d v4.2 src against, the actual one v5.0 test 9
installed cmake into the mingw folder
cmake -G "MinGW Makefiles" worked on after some tries
the .\configure hint was not working, because an configure script was not found.
'mingw32-make all', was able to build until the fmod problem mentioned by doors on his page:
/home/Sources/ta3d
$ mingw32-make all
[ 3%] Built target fileformats
[ 4%] Built target logs
[ 5%] Built target i18n
[ 8%] Built target threads
[ 18%] Built target misc
[ 23%] Built target 3dtoolbox
[ 24%] Built target tdf
[ 25%] Built target ta3dmath
[ 28%] Built target tajpeg
[ 34%] Built target gui
[ 43%] Built target gfx
[ 45%] Built target particles
[ 50%] Built target ingame
[ 51%] Built target audio
[ 53%] Built target debuginfos
[ 54%] Built target console
[ 55%] Built target oldgui
[ 57%] Built target converters
[ 59%] Built target hpi
[ 60%] Built target stdafx
Linking CXX executable ..\3dmeditor.exe
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBC ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
..\bin\libs\Windows\libaudio.a(manager.cpp.obj): In function `ZNSt6vectorIPN4TA3 D5Audio7Manager12PlaylistItemESaIS4_EE13_M_insert_auxEN9__gnu_cxx17__normal_iter atorIPS4_S6_EERKS4_':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allo cator.h:(.text+0x27): undefined reference to `FMOD_Channel_Stop@4'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allo cator.h:(.text+0x35): undefined reference to `FMOD_Sound_Release@4'
..\bin\libs\Windows\libaudio.a(manager.cpp.obj): In function `ZN4TA3D5Audio7Mana ger9stopMusicEv':
C:/MinGW/home/Sources/ta3d/src/sounds/manager.cpp:438: undefined reference to `F MOD_Channel_Stop@4'
C:/MinGW/home/Sources/ta3d/src/sounds/manager.cpp:439: undefined reference to `F MOD_Sound_Release@4'
<snip>
collect2: ld returned 1 exit status
mingw32-make[2]: *** [3dmeditor.exe] Error 1
mingw32-make[1]: *** [src/CMakeFiles/3dmeditor.dir/all] Error 2
mingw32-make: *** [all] Error 2
looks for me like an linking error against c++ mangled functions,so i checked the fmodex.a etc. was in place... but not mentioned in the make rules here 'src/CMakeFiles/3dmeditor.dir/' so i added it, but helps not....
other theory: fmod version change? compiler discrepancy -> have to build fmod myself with my installed gcc?
thank you for suggestions!
You are missing libfmodex.a from src\tools\win32\mingw32\libsshaddim wrote:hello together,
First to all, i'm a pretty unexpierienced in solving unix'oid build problems, but i switched to mingw, to the prepacked version of Doors, MinGW-Ta3d.7z, which i found on his side. (Thank you!)
what i did:
exchanged the ta3d v4.2 src against, the actual one v5.0 test 9
installed cmake into the mingw folder
cmake -G "MinGW Makefiles" worked on after some tries
the .\configure hint was not working, because an configure script was not found.
'mingw32-make all', was able to build until the fmod problem mentioned by doors on his page:
..\bin\libs\Windows\libaudio.a(manager.cpp.obj): In function `ZNSt6vectorIPN4TA3 D5Audio7Manager12PlaylistItemESaIS4_EE13_M_insert_auxEN9__gnu_cxx17__normal_iter atorIPS4_S6_EERKS4_':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allo cator.h:(.text+0x27): undefined reference to `FMOD_Channel_Stop@4'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allo cator.h:(.text+0x35): undefined reference to `FMOD_Sound_Release@4'
..\bin\libs\Windows\libaudio.a(manager.cpp.obj): In function `ZN4TA3D5Audio7Mana ger9stopMusicEv':
C:/MinGW/home/Sources/ta3d/src/sounds/manager.cpp:438: undefined reference to `F MOD_Channel_Stop@4'
C:/MinGW/home/Sources/ta3d/src/sounds/manager.cpp:439: undefined reference to `F MOD_Sound_Release@4'
<snip>
collect2: ld returned 1 exit status
mingw32-make[2]: *** [3dmeditor.exe] Error 1
mingw32-make[1]: *** [src/CMakeFiles/3dmeditor.dir/all] Error 2
mingw32-make: *** [all] Error 2[/i]
looks for me like an linking error against c++ mangled functions,so i checked the fmodex.a etc. was in place... but not mentioned in the make rules here 'src/CMakeFiles/3dmeditor.dir/' so i added it, but helps not....
other theory: fmod version change? compiler discrepancy -> have to build fmod myself with my installed gcc?
thank you for suggestions!
the easiest way to fix this is to grab the 0.5.0 test 8 package.
http://ta3d.freedoors.org/Source/Ta3d%2 ... 0Mingw.exe
install/extract it out.
in the root directory of it C:\ta3dmingw double click on the msys.bat to launch mingw32. This opens mingw with a username of ta3d-dev under home.
cd source32
then run cmake from there. This is a working snapshot directly from my system and cleaned. I test by redownloading from my site, doing a fresh install on another drive letter then running cmake-gui and make. Do not use mingw32-make as this will cause random glitches for reasons beyond me but apparently cmake does not get along with mingw32-make and just loves make under mingw, select msys make files when given the choice.
It will complain about a single missing file, nl.dll, ignore this as it has no affect on compilation and the file is in the game directory anyway. The older mingw setup does not work well with the 0.5.0 series sourcecode so please go ahead and grab the new one.
to test play you can grab
http://ta3d.freedoors.org/Demo/Ta3d%200.5.0-T8.exe
and install/extract that. c:\games\ta3d by default. This archive contains test stuff from the tademo's added to a ta3d setup. It's good enough to test with but not to play long term with, for that you will need OTA so you can copy the data files from disc.
copy 3dmeditor.exe & ta3d-bin.exe or ta3d.exe depending on your source version to the games\ta3d direcotry and enjoy.
Don't just look at the future through a window.
Open a door and go there.
http://ta3d.freedoors.org
http://www.freedoors.org
http://baencd.freedoors.org
Open a door and go there.
http://ta3d.freedoors.org
http://www.freedoors.org
http://baencd.freedoors.org
hello again,
slow but steady progress...
with the help of zuzuf i was able to do an mingw based profile under window, where it behave a little bit different to linux.
with that cmake command it worked:
cmake -DCMAKE_CXX_FLAGS:string="-g -O0 -pg" _other_parameters_ ./
(-p as parameter worked not, no gmon.out produced, also, with -O1 the compile failed completly)
additionally, the libgmon.a library has to be linked in and the gmon.h
compiling worked and after running an gmon.out was produced.
with "gprof ta3d.exe > profile.txt" an flat text profile is produced (under linux it seems to be more clever in assuming the executable)
then, i got the long standing problem that the timings inside were 0 always for all functions.
in various tutorials it is stated that the '-pg' switch has to be forwarded to compiler AND Linker, but ld.exe was not knowing that switch and is was not able the change the linker to gcc.
after some fiddeling around and changing the ld.exe which was used, it worked, mysteriously.
now i'm playing with the vector code... was able to insert inline assembly after some trouble with at&t syntax and the "clobber" list...
maybe something useful arise from that...
greetings
slow but steady progress...
with the help of zuzuf i was able to do an mingw based profile under window, where it behave a little bit different to linux.
with that cmake command it worked:
cmake -DCMAKE_CXX_FLAGS:string="-g -O0 -pg" _other_parameters_ ./
(-p as parameter worked not, no gmon.out produced, also, with -O1 the compile failed completly)
additionally, the libgmon.a library has to be linked in and the gmon.h
compiling worked and after running an gmon.out was produced.
with "gprof ta3d.exe > profile.txt" an flat text profile is produced (under linux it seems to be more clever in assuming the executable)
then, i got the long standing problem that the timings inside were 0 always for all functions.
in various tutorials it is stated that the '-pg' switch has to be forwarded to compiler AND Linker, but ld.exe was not knowing that switch and is was not able the change the linker to gcc.
after some fiddeling around and changing the ld.exe which was used, it worked, mysteriously.
now i'm playing with the vector code... was able to insert inline assembly after some trouble with at&t syntax and the "clobber" list...
maybe something useful arise from that...
greetings
Who is online
Users browsing this forum: No registered users and 17 guests