文件是通用的(三个切片),但是对于iOS上的静态库,文件不包含ARMv7-s切片错误,无论如何都要绕过?

本文翻译自:File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass?

I upgraded Xcode version and when using external static libraries, I get this message: 我升级了Xcode版本,并在使用外部静态库时收到以下消息:

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation) ld:文件是通用文件(3个切片),但不包含a(n)armv7s切片:/体系结构armv7s的/ file / location lang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

Is there any way to bypass this and add support to the library if the developer of the library hasn't updated their library yet? 如果库的开发人员尚未更新其库,是否有任何方法可以绕过此过程并向库添加支持?


#1楼

参考:https://stackoom.com/question/q2Lk/文件是通用的-三个切片-但是对于iOS上的静态库-文件不包含ARMv-s切片错误-无论如何都要绕过


#2楼

If you want to remove the support for any architecture, for example, ARMv7-s in your case, use menu Project -> Build Settings -> remove the architecture from "valid architectures". 如果要删除对任何体系结构的支持,例如您的情况下的ARMv7-s ,请使用菜单项目 -> 构建设置 ->从“有效体系结构”中删除该体系结构。

You can use this as a temporary solution until the library has been updated. 您可以将其用作临时解决方案,直到库已更新。 You have to remove the architecture from your main project, not from the library. 您必须从主项目而不是从库中删除体系结构。

Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. 或者,可以将调试配置的“仅构建活动体系结构”的标志设置为“是”。 Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you ought to upgrade any third-party libraries you're using. 将发布配置的“仅构建活动体系结构”保留为“否”,只是为了在发布之前提醒您应该升级正在使用的任何第三方库。


#3楼

I just posted a fix here that would also apply in this case - basically, you do a hex find-and-replace in your external library to make it think that it's ARMv7s code. 我刚刚在此处发布了一个修复程序,该修复程序也适用于这种情况-基本上,您在外部库中进行了十六进制查找和替换,使其认为它是ARMv7s代码。 You should be able to use lipo to break it into 3 static libraries, duplicate / modify the ARMv7 one, then use lipo again to assemble a new library for all 4 architectures. 您应该能够使用lipo将其分解为3个静态库,复制/修改ARMv7,然后再次使用lipo为所有4种架构组装一个新的库。


#4楼

尝试从项目的“有效架构”中删除armv7,以从iOS 5.1手机的本期发行


#5楼

Flurry Support for iPhone 5 (ARMv7s) As I mentioned in yesterday's post, Flurry started working on a version of the iOS SDK to support the ARMv7s processor in the new iPhone 5 immediately after the announcement on Wednesday. 对iPhone 5(ARMv7s)的Flurry支持正如我在昨天的帖子中所述,Flurry在周三宣布之后立即开始开发iOS SDK版本,以在新iPhone 5中支持ARMv7s处理器。

I am happy to tell you that the work is done and the SDK is now available on the site. 我很高兴地告诉您,这项工作已经完成,并且现在可以在该站点上使用SDK。


#6楼

我已经在目标的构建设置中将“仅构建活动体系结构”切换为“是”,现在可以了!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值