Michel
Michel

Reputation: 11753

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.

Upvotes: 10

Views: 21655

Answers (1)

Abhinav
Abhinav

Reputation: 38142

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.

Upvotes: 7

Related Questions