根據文獻資料,A6處理器將執行ARMv7代碼。我的項目在鏈接上失敗,因爲庫是爲ARMv7構建的,但該應用程序是爲ARMv7構建的。將ARMv7庫鏈接到ARMv7s app
典型的消息是(當我附上我的iPad 4(視網膜)或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)去除ARMv7s解決這個問題,但我不知道爲什麼因爲A6處理器可以執行A5目標代碼。或者我可以爲ARMv7s架構執行額外的庫構建,但這是更多的工作,並且需要不同的磁盤目錄結構。
將ARMv7庫與ARMv7s應用程序鏈接起來有什麼魔力嗎?
我想你的lib是爲(armv6&armv7)和主要項目編譯(armv7&armv7s)..只是用(armv7&armv7s)替換lib ...問題解決...! – Guru
處理器能夠執行向後兼容的代碼並不意味着鏈接器也可以處理生成的代碼的所有版本。重新編譯用於armv7s的「FIPS」庫,或禁用armv7s。 – 2012-12-29 08:02:14
謝謝@Raj - 不,我建立了一個庫 - ARMv7(不是ARMv6和ARMv7)。它是使用iPhoneOS6.0 SDK構建的。 – jww