当我尝试链接当前项目时,我看到很多此类错误。我该怎么办?
这是日志中希望相关的部分。我已经编辑了部分路径:
Libtool "[path]/Build/Intermediates/extobjc.build/Release-iOS-Internal-iphoneos/libextobjc (iOS).build/Objects-normal/armv6/libextobjc_iOS.a" normal armv6
cd [path]/libextobjc
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool -static -arch_only armv6 -syslibroot /[Path]/Build/Products/Release-iOS-Internal-iphoneos -filelist "[path]/extobjc.build/Release-iOS-Internal-iphoneos/libextobjc (iOS).build/Objects-normal/armv6/extobjc_iOS.LinkFileList" -framework Foundation -o "[path]/extobjc.build/Release-iOS-Internal-iphoneos/libextobjc (iOS).build/Objects-normal/armv6/libextobjc_iOS.a"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: file: [path]/Build/Intermediates/extobjc.build/Release-iOS-Internal-iphoneos/libextobjc (iOS).build/Objects-normal/armv6/EXTMultiObject.o is not an object file (not allowed in a library)
编辑:希望从日志中可以清楚地看出 - 但链接库时会出现麻烦。
最佳答案
我遇到了类似的错误。从 SVN 存储库提交/ checkout 时,xCode 似乎忽略了所有“.a”文件。我手动放置这些文件并进行了干净的构建。
关于iphone - Xcode libtool 错误 -- "foo.o is an object file (not allowed in a library)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6838210/