我正在构建一个iOS应用程序。在链接框架时,我收到以下警告和错误:
ld: warning: ignoring file /Users/XXX/libs/abc.framework/abc, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x41 0x2F 0x69 0x43 0x6F 0x6E 0x6E ) which is not the architecture being linked (armv7): /Users/XXX/libs/abc.framework/abc
[TRACE] : Undefined symbols for architecture armv7:
[TRACE] : "_OBJC_CLASS_$_myMethod", referenced from:
[TRACE] : objc-class-ref in libcom.abc.def.a(ComAbcDefModule.o)
[TRACE] : ld: symbol(s) not found for architecture armv7
[TRACE] : clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/Debug-iphoneos/MyApp.app/MyApp normal armv7
当我在abc.framework文件(abc.framework / Versions / A / abc.1.0.1)中的库上运行lipo -info和文件时,我看到它说它包含armv7架构:
lipo -info abc.1.0.1
Architectures in the fat file: abc.1.0.1 are: armv7 armv7s arm64 x86_64
file abc.1.0.1
abc.1.0.1: Mach-O universal binary with 4 architectures
abc.1.0.1 (for architecture armv7): current ar archive random library
abc.1.0.1 (for architecture armv7s): current ar archive random library
abc.1.0.1 (for architecture cputype (16777228) cpusubtype (0)): current ar archive random library
abc.1.0.1 (for architecture x86_64): current ar archive random library
所以我无法联系。我花了一整天时间尝试一切。为什么它抱怨无法在那里找到armv7架构?此外,有人可以解释这是不支持的文件格式吗?