Xcode libtool 错误 - “foo.o 是目标文件(库中不允许)”
当我尝试链接当前项目时,我看到很多这样的错误。我该怎么办?
这是日志中希望相关的部分。我已经编辑了一些路径的一部分:
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)
编辑:希望从日志中可以清楚地看出 - 但链接库时会出现麻烦。
I am seeing a lot of this error when I try to link my current project. What am I to make of it?
Here is the hopefully relevant portion of the log. I have redacted part of some of the paths:
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)
EDIT: hopefully it is clear from the log -- but the trouble comes when linking a library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了类似的错误。从 SVN 存储库提交/签出时,xCode 似乎忽略了所有“.a”文件。我手动放置这些文件并进行了干净的构建。
I got a similar error. It seems like xCode is ignoring all ".a" files when commiting/checking-out from a SVN repository. I put these files manually and did a clean build.