根据文献,A6 处理器将执行 ARMv7 代码。我的项目链接失败,因为为 ARMv7 构建了一个库,但该应用程序是为 ARMv7s 构建的。
一条典型的消息是(当我连接 iPad 4 (Retina) 或 iPhone 5 时):
ld: warning: ignoring file /usr/local/ssl/iphoneos/lib//fipscanister.o, file was built for armv7 which is not the architecture being linked (armv7s): /usr/local/ssl/iphoneos/lib//fipscanister.o
ld: warning: ignoring file /usr/local/ssl/iphoneos/lib//libcrypto.a, file was built for archive which is not the architecture being linked (armv7s): /usr/local/ssl/iphoneos/lib//libcrypto.a
Undefined symbols for architecture armv7s:
"_FIPS_incore_fingerprint", referenced from:
_FINGERPRINT_premain in fips_premain.o
"_FIPS_signature", referenced from:
_FINGERPRINT_premain in fips_premain.o
"_FIPS_text_start", referenced from:
_FINGERPRINT_premain in fips_premain.o
ld: symbol(s) not found for architecture armv7s
我知道我可以通过从有效架构 (VALID_ARCHS) 中删除 ARMv7 来解决这个问题,但我不确定为什么,因为 A6 处理器可以执行 A5 目标代码。或者我可以为 ARMv7s 架构执行额外的库构建,但这需要更多的工作并且需要不同的磁盘目录结构。
将 ARMv7 库与 ARMv7s 应用程序链接起来有什么魔力吗?