我正在尝试使用Xcode 6.0.1编译Ogre3D(C ++)。 Ogre依赖于boost库,这就是问题所在。据我所知,boost默认情况下不会以允许Xcode编译器使用它的方式构建。
我首先尝试使用
通过端口安装boostport install boost +universal
正如Ogre论坛上所建议的那样。当这不起作用时,我卸载了boost,从/ opt / local / include和/ opt / local / lib中删除了对它的任何引用,并试图从boost网站手动安装到/ Developer / SDKs / boost根据他们的指示下载。我甚至尝试了修复建议here,这应该会增强与Xcode的兼容性,但这也无效。
我总是遇到错误:
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
在Xcode构建设置中,我有这些规范:
Xcode的构建命令输出为:
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
我不知道此时该做什么,有人设法解决这个问题吗?