尽管仅恢复为32位体系结构,但在Xcode 5.1上仍然会出现链接器错误 [英] Keep getting linker errors on Xcode 5.1 despite reverting to 32bit architectures only

查看:87
本文介绍了尽管仅恢复为32位体系结构,但在Xcode 5.1上仍然会出现链接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我更新到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.

关于此功能和Link Time Optimization(我已经将其设置为)的问题,Xcode 5.1中似乎存在一个错误.

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标志重新设置为是"不再导致链接错误.

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上仍然会出现链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆