问题描述
自从我更新到 Xcode 5.1 后,将标准架构更改为还包括 arm64
,我不断收到来自链接器的以下错误:
since I updated to Xcode 5.1, which changes the standard architectures to also include arm64
, I keep getting the following error from the linker:
0 0x109157f93 __assert_rtn + 144
1 0x1091faed4 ld::passes::stubs::Pass::makeStub(ld::Atom const&, bool) + 0
2 0x1091fb5f7 ld::passes::stubs::Pass::process(ld::Internal&) + 497
3 0x1091fbc07 ld::passes::stubs::doPass(Options const&, ld::Internal&) + 111
4 0x109158b50 main + 772
5 0x7fff8568b5fd start + 1
A linker snapshot was created at:
/tmp/MyApp-2014-02-19-175731.ld-snapshot
ld: Assertion failed: (target != NULL), function stubableFixup, file /SourceCache/ld64/ld64-236.3/src/ld/passes/stubs/stubs.cpp, line 126.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
鉴于我使用仅针对 armv7 编译的第三方库这一事实,我尝试将架构"和有效架构"选项设置为仅在项目和目标的构建设置中包含 armv7,但我不断收到错误消息,即使在清洁之后......知道吗?
given the fact that I use third party libraries which are compiled only for armv7, I tried to set the Architectures and Valid Architectures options to only include armv7, in both the Project's and the target's build settings, but I keep getting the error, even after cleaning... any idea?
谢谢!
推荐答案
在我的情况下,解决方案(一种解决方法 - 相反)是禁用链接部分中的 Dead Code Stripping
功能构建设置.
The solution (a workaround - rather), in my case, was to disable the Dead Code Stripping
functionality in the Linking section of the Build Settings.
Xcode 5.1 中似乎存在与此功能和 Link Time Optimization
相关的错误(我已将其设置为 NO).
There seems to be a bug in Xcode 5.1 regarding this feature and the Link Time Optimization
one (which I already had set to NO).
更多信息可以在这里找到:https://devforums.apple.com/message/950372#950372
More info can be found here: https://devforums.apple.com/message/950372#950372
编辑 (2014-04-18):
这个问题似乎从 Xcode 5.1.1 开始得到解决,因为将 Dead Code Stripping
标志转回 Yes 不再导致链接错误.
The problem seems to be solved as of Xcode 5.1.1, as turning the Dead Code Stripping
flag back to Yes no longer results in the linking error.
这篇关于尽管仅恢复到 32 位体系结构,但仍然在 Xcode 5.1 上出现链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!