I've been trying to compile Linwarrior 3D on OS X Snow Leopard, 10.6.8., I'm not experienced with compiling C/C++ code under OS X, or any other platform for that matter, and getting over some compiling errors is becoming hard. I'm hopping someone with OS X experience can give some pointers.
After a few bumps along the way, my current problem is that compiling shows errors on OpenAL header files . The default compiler is based on GCC 4.2.1, with patches by Apple, and doesn't compile the code since it uses some new features. I've installed macports version that is GCC 4.5.3 but I can't seem to get the code to compile and it always blows up in OpenAL headers and I can't understand what is going on.
I get a bunch of this:
- {l Code}: {l Select All Code}
In file included from source/de/hackcraft/object/cObject.h:36:0,
from source/de/hackcraft/comp/rWeapon.h:14,
from source/de/hackcraft/main.h:17,
from source/de/hackcraft/main.cpp:3:
/Library/Frameworks/OpenAL.framework/Headers/AL/al.h:87:37: error: '<anonymous>' has incomplete type
/Library/Frameworks/OpenAL.framework/Headers/AL/al.h:87:44: error: invalid use of 'ALvoid'
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:0,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:20,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
from /Library/Frameworks/OpenAL.framework/Headers/AL/alut.h:27,
from source/de/hackcraft/object/cObject.h:37,
from source/de/hackcraft/comp/rWeapon.h:14,
from source/de/hackcraft/main.h:17,
from source/de/hackcraft/main.cpp:3:
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h:147:120: error: format string argument not a string type
After the above error, several other show but I believe they are dependent on the first errors.
This is line I'm using for compiling:
- {l Code}: {l Select All Code}
/opt/local/bin/g++-mp-4.5 -Wp,-M,-MP,-MT,build/source/de/hackcraft/main.o,-MF,dep/build-source-de-hackcraft-main.o.d -std=c++0x -Wall -I source -I/Library/Frameworks/OpenAL.framework/Headers/ -I/opt/local/include/ -O1 -funroll-loops -DTARGET_OS_MAC=1 -Wno-unknown-pragmas -c source/de/hackcraft/main.cpp -o build/source/de/hackcraft/main.o
The original thread in the LW3D is viewtopic.php?f=52&t=1583&start=0 , any suggestions?
Regards,
Knitter