缺少必需的架构x86_64 [英] missing required architecture x86_64
问题描述
我有一个旧项目,我为一个uodate重新编译,它现在显示此错误消息:
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 ….
我在网上搜索后尝试了各种技巧缺少文件
中所需的体系结构x86_64,但没有成功。任何人都知道如何正确处理这个问题?
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?
我正在使用Xcode版本7.0.1。
I am using Xcode Version 7.0.1.
运行:
lipo -info myLibrary.a
显示:
Architectures in the fat file: myLibrary.a are: armv7 arm64
我已经能够添加armv7但不能添加x86_64。
I have been able to add armv7s but not x86_64.
推荐答案
您正在尝试构建通用库,并且它没有所有架构 armv7 armv7s i386 x86_64 arm64
。编译器在使用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:
这需要手动添加如下所示的体系结构:
This needs manual addition of architectures something like this:
在设备和设备上使用这些架构构建库。模拟器,使用 lipo -create -outputmyLibrary.a创建胖库./Simulator/myLibrary.a ./Device/myLibrary.a
并使用它。
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.
这篇关于缺少必需的架构x86_64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!