CommonCrypto不是为archv7 iOS构建的 [英] CommonCrypto isn't building for arch armv7 iOS

查看:69
本文介绍了CommonCrypto不是为archv7 iOS构建的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近刚升级到新的XCode。升级后,我的一些应用程序将无法构建。我收到此错误:

I recently just upgraded to the new XCode. After I upgraded, some of my apps won't build. I get this error:

ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/system/libcommonCrypto.dylib.  Link against the umbrella framework 'System.framework' instead. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经尝试了一切 - 清理,重新导入,更改架构...

I've tried everything - cleaning, reimporting, changing architectures...

请帮助

推荐答案

在我尝试了上述两种方法之后,我以不同的方式解决了这个问题。

I resolved this issue in a diffent way after I tried both the above where neither worked for me.

问题在于,当我从主界面添加库时(主要构建设置......等),我最初在搜索 crypto 然后两个库回来 libcorecrypto.dylib liblibcommonCrypto.dylib ,如果你请注意,两者都存在灰色,与通常添加的通常为黄色的库不同。添加这些会导致编译器报告(某些其他库缺失,例如libz,或者需要更多函数的其他库。

The problem was that when I was adding the library from the main interface (main build-settings...etc) I was searching initially for crypto and then two libs comes back libcorecrypto.dylib and liblibcommonCrypto.dylib, if you notice, both exists in gray-color unlike the usually yello-colored libs that you normally add. Adding these causes the compiler to report back (some other libs are missing, such as the libz, or another lib that will be needed the more functions you take on.

如果您注意到上面两个库通常位于 JavaScriptCore.framework 库(黄色库)下,因此,删除上面两个并添加 JavaScriptCore.framework 相反,问题已解决,构建成功显示

If you notice the above two libs would normally sit under JavaScriptCore.framework library (which is the yellow one), therefore, by removing the above two and adding JavaScriptCore.framework instead, the problem was resolved, and build successful showed

提到基于在 JavaScriptCore.framework 中作为一个包存在的灰色库,libcrypto和另一个将不存在于 / Library下/.../ system / path 如上所述,即你没有从系统中删除它们,它们就不在那里。

Also to mention that based on the gray-libs existing as a bundle inside JavaScriptCore.framework, the libcrypto and the other one will not exists under the /Library/.../system/path as mentioned above, i.e. you didn't delete them from your system, they're just not there.

同样,解决方案是:

* 从您的主要XCODE项目设置中,不要添加: * dd

libcorecrypto.dylib 
liblibcommonCrypto.dylib

相反,请添加:

JavaScriptCore.framework

在你的。 m(代码),只需通过以下方式获取它们:

#include <CommonCrypto/CommonDigest.h> (or any of your other libs as needed in code)...

它应该可以正常工作。

我希望这会有所帮助。

亲切的问候

这篇关于CommonCrypto不是为archv7 iOS构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆