XCode中,如果直接将 xxx.a 文件拖进到项目中,有时会出现异常。
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lxxx
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lxxx is not an object file (not allowed in a library)
解决方法:在Build Settings选项中,找到Library Search Paths,将 xxx.a 所在的目录加入进去。