如何更新我们的静态库架构以支持 arm64 Build? [英] How to update our static library architecture for suporting arm64 Build?
问题描述
几天前我创建了 static-library(通用),它与 Xcode5.0 SDK7
一起工作正常.使用 SDK7.1
更新 Xcode5.1
后,如果我选择模拟器 iPhone Retina(4-inch 64-bit)
,则不起作用.然后我将使用 Bellow 设置更改更新我的库.
Few days ago i create static-library (Universal) that work's fine with Xcode5.0 SDK7
. After Update Xcode5.1
with SDK7.1
that not work if i select simulator iPhone Retina(4-inch 64-bit)
. Then i am going to update my lib with Bellow setting change.
我对三个目标做同样的事情:-
I do the same for three Target:-
对于运动模拟器和设备,我放置了通用库,并在其中运行脚本:-
For sporting simulator as well as device i put Universal lib and in to this i run script this:-
在此之后,我再次构建 lib 并像我之前所做的那样使用到我的项目中.但是在 iPhone Retina(4-inch 64-bit)
架构 x86_64 的未定义符号仍然有同样的问题:
After this i Build Again lib and used as i done Before in to my project. But still getting same issue with iPhone Retina(4-inch 64-bit)
Undefined symbols for architecture x86_64:
所以,我的问题是更新 arm64 或者我在上述步骤中犯了任何错误.如果我错了,请告诉我.
So, My question is that is there any additional change required for updating lib for arm64 or i did any mistake in above step. Please current me if i am wrong.
更新我的静态库以支持64Bit 架构
注意:
我要求我自己创建的库更新.我没有使用第三方库.更新
I am asking for my own created Library Update. i am not using third-party Library. Update
我在我的终端中使用了这个 lipo -info testingLibImport/libLibNSlog.a
命令,输出是:
I used this lipo -info testingLibImport/libLibNSlog.a
command in to my Terminal that output is:
Architectures in the fat file: testingLibImport/libLibNSlog.a are: armv7 armv7s i386 arm64
推荐答案
经过很多事情我得到了解决方案.一些 xcode 不知道有自动出现 Standard architectures (including 64-bit) (armv7,armv7s,arm64)
但就我而言,我的 静态库项目中没有选项.所以我要手动添加这个:-
After lots of stuff i got solution. some of xcode dont know there is automatic appear Standard architectures (including 64-bit) (armv7,armv7s,arm64)
but in my case there is not option into my Static Library Project. so i am going to add this Manually like:-
并选择此选项:-
在此之后,我重新构建我的静态库并在我的项目中使用,现在工作正常.我还检查了终端中的 lipo 命令,该输出现在不同了:-
After this i re-Build My static Library and used in to in my project that working fine now. and I also checked with lipo command in to terminal that output going to different now:-
testingLibImport/libLibNSlog.a 是:armv7 armv7s i386 x86_64 arm64
这篇关于如何更新我们的静态库架构以支持 arm64 Build?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!