Xcode libtool 错误 - “foo.o 是目标文件(库中不允许)”

发布于 2024-11-26 15:30:40 字数 1152 浏览 0 评论 0原文

当我尝试链接当前项目时,我看到很多这样的错误。我该怎么办?

这是日志中希望相关的部分。我已经编辑了一些路径的一部分:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

窝囊感情。 2024-12-03 15:30:40

我遇到了类似的错误。从 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文