错误信息:
Libtool /Volumes/Interesting/Projects/Games/cocos2d-x/tests/cpp-tests/bin/debug/mac/libcocosNetwork\ Mac.a normal x86_64
cd /Volumes/Interesting/Projects/Games/cocos2d-x/build
export MACOSX_DEPLOYMENT_TARGET=10.7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Volumes/Interesting/Projects/Games/cocos2d-x/tests/cpp-tests/bin/debug/mac -L/Users/huabingxu/work/cocos2d-x/external/websockets/prebuilt/mac -filelist /Volumes/Interesting/Projects/Games/cocos2d-x/build/build/cocos2d_libs.build/Debug/cocosNetwork\ Mac.build/Objects-normal/x86_64/cocosNetwork\ Mac.LinkFileList -lwebsockets -o /Volumes/Interesting/Projects/Games/cocos2d-x/tests/cpp-tests/bin/debug/mac/libcocosNetwork\ Mac.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can’t locate file for: -lwebsockets
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lwebsockets is not an object file (not allowed in a library)
** BUILD FAILED **
解决办法:
将build/cocos2d_libs.xcodeproj/project.pbxproj中的/Users/huabingxu/work/cocos2d-x/替换成正确路径,你懂的。