I am building an iOS app. While linking a framework I get the following warning and error:
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
When I run lipo -info and file on the library inside the abc.framework file (abc.framework/Versions/A/abc.1.0.1), I see this saying that it contains the armv7 architecture:
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
So I can't link. I've spent a whole day trying everything. Why is it complaining about not being able to find the armv7 architecture when it is in there? Also, can someone explain what unsupported file format this is?