当用xcode7编译老版本的程序文件时可能会提示一些错误,下面是解决方法
1.
1)提示
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can’t open file: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libsqlite3.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can’t open file: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libz.dylib (No such file or directory)
2)解决方法
(1)finder进入目录/usr/lib,拷贝libsqlite3.dylib、libz.dylib、libz.1.dylib(因为libz.dylib是替身,所以要复制libz.1.dylib才行)
(2)将文件复制到/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/目录中
2.
1)提示
ld: ‘/Users/user/Library/Developer/Xcode/DerivedData/mm-bmmuzbzukkxznzesvhudlhxbzcfj/Build/Products/Debug-iphoneos/libcocos2d iOS.a(md5_dgst.o)’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
2)解决方法
(1)修改Build Setting/Build Options/enable bitcode为no