本文介绍了链接器命令失败,退出代码为1 xcode4.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我把iphone4s和xcode更新到昨天的最新版本。我正在尝试调试我的应用程序在我的手机,因为我的应用程序使用硬件通信。
我正在使用RedPark的第三方库(该公司提供Dock到RS232线)
编译时,会发生错误

  ld:文件是通用的(2片),但不包含(n)armv7s片:/ Users /...../ libRscMgrUniv.a为架构armv7s 
clang:错误:链接器命令失败,退出代码1(使用-v查看调用)

有谁知道如何解决这个问题,除了等待Redpark更新那个库吗?

解决方案

你可以简单的禁用通过将$ code> $ VALID_ARCHITECTURES (其评估为 armv7 armv7s 替换为构建设置中的armv7s 现在)的值通过显式值 armv7



因此,您的应用程序只会为 armv7 而不是 armv7s ,所以不会对新iPhone5进行全面优化,但是仍然会在iPhone 4和5上运行( a iPhone 5的rmv7s处理器可以执行 armv7 应用程序,它不像 armv7s 处理器专用指令)


I updated my iphone4s and xcode to the latest yesterday. And I'm trying to debug my app on my phone since my application uses hardware communication.I'm using a third party library from Redpark(the company provides Dock to RS232 wire.)While compiling, it gives an error

ld: file is universal (2 slices) but does not contain a(n) armv7s slice:/Users/...../libRscMgrUniv.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does anyone know how to solve this except waiting for Redpark to update there library?

解决方案

You can simply disable the compilation of armv7s in your Build Settings, by replacing the $VALID_ARCHITECTURES (which evaluates to armv7 armv7s now) value by the explicit value armv7.

Thus your application will only build for armv7 and not armv7s, so will not be fully optimized for the new iPhone5, but it will still run on iPhone 4 and 5 anyway (the armv7s processor of the iPhone 5 can execute armv7 applications, it is just not as optimized as with armv7s processor dedicated instructions)

这篇关于链接器命令失败,退出代码为1 xcode4.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 04:36