Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

missing required architecture x86_64

I have an old project, that I recompiled for an uodate, and it is now showing this error message:

 …. missing required architecture x86_64 in file myLibrary.a ….

I have tried various tricks that I could find on the net after searching on missing required architecture x86_64 in file, but with no success. Anyone knows how to properly handle the issue?

I am using Xcode Version 7.0.1.

Running:

lipo -info myLibrary.a

shows:

Architectures in the fat file: myLibrary.a are: armv7 arm64 

I have been able to add armv7s but not x86_64.

like image 208
Michel Avatar asked Nov 03 '15 05:11

Michel


1 Answers

You are trying to build a universal library and it does not have all the architectures in it armv7 armv7s i386 x86_64 arm64. Compiler is complaining when you build with 64 bit architecture.

To fix this - Add the following to your architecture settings of static library project:

enter image description here

This needs manual addition of architectures something like this:

enter image description here

Build the library with these architecture both on device & simulator, create fat library using lipo -create -output "myLibrary.a" ./Simulator/myLibrary.a ./Device/myLibrary.a and use it.

like image 110
Abhinav Avatar answered Nov 14 '22 06:11

Abhinav