1
  • I have made my own static library named uexLiving.a. And this static library includes two framework (not created by me) named NBPClientLib.framework and UPnP.framework.
  • After that I am trying to use this static library in my another iOS project. But it is building unsuccessfully.
  • The warning is

[2015-08-06 21:21:56,351] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - ld: warning: ignoring file /ram_disk/temp/XO8Nv2tIc9JI/AppCanPlugin/AppCanPlugin/uexFrameworks/NBPClientLib.framework/NBPClientLib, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (armv7): /ram_disk/temp/XO8Nv2tIc9JI/AppCanPlugin/AppCanPlugin/uexFrameworks/NBPClientLib.framework/NBPClientLib

[2015-08-06 21:21:56,351] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - ld: warning: ignoring file /ram_disk/temp/XO8Nv2tIc9JI/AppCanPlugin/AppCanPlugin/uexFrameworks/UPnP.framework/UPnP, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (armv7):

[2015-08-06 21:21:56,353] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - ld: warning: ld: warning: ignoring file /ram_disk/temp/XO8Nv2tIc9JI/AppCanPlugin/AppCanPlugin/uexFrameworks/NBPClientLib.framework/NBPClientLib, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (arm64):

  • So I got the error:

[2015-08-06 21:21:56,351] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - Undefined symbols for architecture armv7: [2015-08-06 21:21:56,352] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - "_OBJC_CLASS_$_N_ClientLib", referenced from: [2015-08-06 21:21:56,352] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - objc-class-ref in libuexLiving.a(EUExLiving.o) [2015-08-06 21:21:56,352] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - ld: symbol(s) not found for architecture armv7 [2015-08-06 21:21:56,352] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - clang: error: linker command failed with exit code 1 (use -v to see invocation)

[2015-08-06 21:21:56,353] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - Undefined symbols for architecture arm64: [2015-08-06 21:21:56,353] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - "_OBJC_CLASS_$_N_ClientLib", referenced from: [2015-08-06 21:21:56,353] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - objc-class-ref in libuexLiving.a(EUExLiving.o) [2015-08-06 21:21:56,353] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - ld: symbol(s) not found for architecture arm64 [2015-08-06 21:21:56,353] DEBUG SimpleAsyncTaskExecutor-1 //opt/applog//114/458/28/11445828-iphone - clang: error: linker command failed with exit code 1 (use -v to see invocation)

  • What's wrong with this two framework? How can I resolve this problem?

Update

I use the terminal to check the architecture of the framework. It shows that

Zemans-Macbook:1 nathan$ file UPnP

UPnP: Mach-O universal binary with 4 architectures

UPnP (for architecture armv7): current ar archive random library

UPnP (for architecture i386): current ar archive random library

UPnP (for architecture x86_64): current ar archive random library

UPnP (for architecture arm64): current ar archive random library

Zemans-Macbook:1 nathan$ file NBPClientLib

NBPClientLib: Mach-O universal binary with 4 architectures

NBPClientLib (for architecture armv7): current ar archive random library

NBPClientLib (for architecture i386): current ar archive random library

NBPClientLib (for architecture x86_64): current ar archive random library

NBPClientLib (for architecture arm64): current ar archive random library

Zeman
  • 21
  • 3
  • How can a static library contain frameworks? – trojanfoe Aug 06 '15 at 14:21
  • The static library(also means the .a file) does not contain the framework, just import it. – Zeman Aug 06 '15 at 14:23
  • Hmm, not really. It can be compiled to use the framework, sure, but the application/dylib/framework that uses the static library will have to link with these frameworks. – trojanfoe Aug 06 '15 at 14:24
  • Yes. But the compiler shows that the framework do not support architecture armv7 and arm64. – Zeman Aug 06 '15 at 14:29
  • Well it sounds like you know the reason for the error message. I assume you've checked the CPU architectures compiled into these other frameworks? – trojanfoe Aug 06 '15 at 14:31
  • I use the terminal to check the two frameworks. And I have put the information above. – Zeman Aug 06 '15 at 14:35
  • I don't see information about `NBPClientLib.framework` etc? – trojanfoe Aug 06 '15 at 14:37
  • It is very strange that the two frameworks support armv7 and arm64, but the compiler still shows that waring. – Zeman Aug 06 '15 at 14:37
  • Sorry. I forgot it. It's same. – Zeman Aug 06 '15 at 14:38
  • Zemans-Macbook:1 nathan$ file NBPClientLib NBPClientLib: Mach-O universal binary with 4 architectures NBPClientLib (for architecture armv7): current ar archive random library NBPClientLib (for architecture i386): current ar archive random library NBPClientLib (for architecture x86_64): current ar archive random library NBPClientLib (for architecture arm64): current ar archive random library – Zeman Aug 06 '15 at 14:38
  • This may be a problem with GNU binutils being in `$PATH`: https://stackoverflow.com/a/62437450/14558 – andrewdotn Jan 05 '21 at 22:03

0 Answers0