missing required architecture x86_64

馋奶兔 提交于 2019-12-06 00:47:52

问题


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.


回答1:


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:

This needs manual addition of architectures something like this:

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.



来源:https://stackoverflow.com/questions/33491858/missing-required-architecture-x86-64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!