Xcode 6.1 Missing Required Architecture X86_64 in File

Xcode 6.1 Missing required architecture X86_64 in file

  • The first thing you should make sure is that your static library has all architectures. When you do a lipo -info myStaticLibrary.a on terminal - you should see armv7 armv7s i386 x86_64 arm64 architectures for your fat binary.

  • To accomplish that, I am assuming that you're making a universal binary - add the following to your architecture settings of static library project -

Sample Image

  • So, you can see that I have to manually set the Standard architectures (including 64-bit) (armv7, armv7s, arm64) of the static library project.

Sample Image

  • Alternatively, since the normal $ARCHS_STANDARD now includes 64-bit. You can also do $(ARCHS_STANDARD) and armv7s. Check lipo -info without it, and you'll figure out the missing architectures. Here's the screenshot for all architectures -

Sample Image

  • For your reference implementation (project using static library). The default settings should work fine -

    Sample Image

Update 12/03/14
Xcode 6 Standard architectures exclude armv7s.

So, armv7s is not needed? Yes. It seems that the general differences between armv7 and armv7s instruction sets are minor. So if you choose not to include armv7s, the targeted armv7 machine code still runs fine on 32 bit A6 devices, and hardly one will notice performance gap. Source

If there is a smarter way for Xcode 6.1+ (iOS 8.1 and above) - please share.

missing required architecture x86_64

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:

Sample Image

This needs manual addition of architectures something like this:

Sample Image

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.



Related Topics



Leave a reply



Submit