直到 Xcode 4 正式版之前 (我一直使用 3.x 最新版以及 4 GM 版本),这种情况从未发生过。 当我升级到 Xcode 4 正式版后,我在尝试将 armv7 版本与我的非 armv7 库链接时遇到了链接错误(我的项目设置为默认的标准 armv6 armv7 可用结构):
ld: warning: ignoring file ../bin/iOS static/arm/libssl.a, file was built for archive which is not the architecture being linked (armv7)
ld: warning: ignoring file ../bin/iOS static/arm/libcrypto.a, file was built for archive which is not the architecture being linked (armv7)
Undefined symbols for architecture armv7: -- list of symbols --
armv6版本可以编译成功,但是整个编译过程会失败,并出现77个链接错误。
我知道这是预期行为,它不会将armv6库链接到armv7。解决方法是将我的项目设置为仅支持armv6。我的问题是:为什么在之前的Xcode版本中可以正常工作?
如果我设置为仅支持armv6,就会收到以下警告:
Check dependencies
[BWARN]warning: all apps should include an armv7 architecture (current ARCHS = "armv6").
我不喜欢看到警告 :-) 有人遇到类似的问题吗?
谢谢,
Fernando