I am trying to compile Ogre3D (C++) using Xcode 6.0.1. Ogre depends on the boost library, which is the problem. As far as I understand it, boost does not build by default in a way that allows Xcode's compiler to use it.
I first tried to install boost through ports, using
port install boost +universal
as suggested on Ogre forums. When that didn't work, I uninstalled boost, got rid of any references to it from /opt/local/include and /opt/local/lib and tried to install it manually to /Developer/SDKs/boost from the boost web site download, according to their instructions. I even tried the fix suggested here, that is supposed to build boost for compatibility with Xcode but that didn't work either.
I always get errors like:
Ignoring file /Developer/SDKs/boost/lib/libboost_date_time.a, file was built for archive which is not the architecture being linked (i386): /Developer/SDKs/boost/lib/libboost_date_time.a
Undefined symbols for architecture i386:
"boost::this_thread::disable_interruption::disable_interruption()", referenced from:
boost::shared_mutex::lock() in OgreWorkQueue.o
In Xcode build settings, I have these specifications:
- Architecture: Universal (x86_64,i386)
- Compiler: Apple LLBm 6.0
Xcode's build command output is:
build/lib/macosx/Debug/Ogre.framework/Versions/1.10.0/Ogre normal x86_64
cd /Developer/SDKs/OgreSDK_latest
export MACOSX_DEPLOYMENT_TARGET=10.7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L/Developer/SDKs/OgreSDK_latest/build/lib/macosx/Debug -L/opt/local/lib/Debug -L/opt/local/lib -F/Developer/SDKs/OgreSDK_latest/build/lib/macosx/Debug -F/Library/Frameworks -filelist /Developer/SDKs/OgreSDK_latest/build/OgreMain/OGRE.build/Debug/OgreMain.build/Objects-normal/x86_64/Ogre.LinkFileList -install_name @executable_path/../Frameworks/Ogre.framework/Versions/1.10.0/Ogre -mmacosx-version-min=10.7 -framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo /Developer/SDKs/boost/lib/libboost_thread.a /Developer/SDKs/boost/lib/libboost_date_time.a /Developer/SDKs/OgreSDK_latest/Dependencies/lib/Debug/libfreeimage.a /Developer/SDKs/OgreSDK_latest/Dependencies/lib/Debug/libzzip.a /usr/lib/libz.dylib -stdlib=libc++ -fobjc-link-runtime -single_module -compatibility_version 1.10.0 -current_version 1.10.0 -Xlinker -dependency_info -Xlinker /Developer/SDKs/OgreSDK_latest/build/OgreMain/OGRE.build/Debug/OgreMain.build/Objects-normal/x86_64/Ogre_dependency_info.dat -o /Developer/SDKs/OgreSDK_latest/build/lib/macosx/Debug/Ogre.framework/Versions/1.10.0/Ogre
I am not sure what to do at this point, did anyone manage to solve this problem?