打包APP时报错 linker command failed with exit code 1 (use -v to see invocation)
来源:互联网 发布:菜鸟网络天津武清园区 编辑:程序博客网 时间:2024/05/21 14:50
转自:http://www.jianshu.com/p/df5e9c7d61f0
用的是xcode 8 在模拟器和真机时候都没有问题,但是进行Archive时,会报这样的错误:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
最终找到原因:
在Xcode 7中,我们新建一个iOS程序时,bitcode选项默认是设置为YES的。我们可以在”Build Settings”->”Enable Bitcode”选项中看到这个设置。不过,我们现在需要考虑的是三个平台:iOS,Mac OS,watchOS。对于iOS,bitcode是可选的;对于watchOS,bitcode是必须的;而Mac OS是不支持bitcode。所以,如果我们的工程需要支持bitcode,则必要要求所有引入的第三方库都支持bitcode。
根据苹果官方文档解释:
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store.Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.说的是bitcode是被编译程序的一种中间形式的代码。包含bitcode配置的程序将会在App store上被编译和链接。bitcode允许苹果在后期重新优化程序的二进制文件,而不需要重新提交一个新的版本到App store上。
也就是说,当提交程序到App store上时,Xcode会将程序编译为一个中间表现形式(bitcode)。然后App store会再将这个botcode编译为可执行的64位或32位程序。
解决方案
Build Settings中,把Enable Bitcode设置为NO
0 0
- 打包APP时报错 linker command failed with exit code 1 (use -v to see invocation)
- iOS报错:linker command failed with exit code 1 (use -v to see invocation)
- iOS报错:linker command failed with exit code 1 (use -v to see invocation)
- linker command failed with exit code 1 (use -v to see invocation)报错
- error: linker command failed with exit code 1 (use -v to see invocation)报错总结
- iOS报错:linker command failed with exit code 1 (use -v to see invocation)解决方法
- iOS 报linker command failed with exit code 1 (use -v to see invocation)错
- linker command failed with exit code 1 (use -v to see invocation)报错
- linker command failed with exit code 1 (use -v to see invocation)报错汇总
- Xcode报错: linker command failed with exit code 1 (use -v to see invocation)
- 错误1_clang: error: linker command failed with exit code 1 (use -v to see invocation)
- Exception for IOS 1-linker command failed with exit code 1 (use -v to see invocation)
- 解决 linker command failed with exit code 1 (use -v to see invocation) 方法
- linker command failed with exit code 1 (use -v to see invocation) Undefined symbols for architecture
- error: linker command failed with exit code 1 (use -v to see invocation)
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
- linker command failed with exit code 1 (use -v to see invocation)
- linker command failed with exit code 1 (use -v to see invocation)
- 高阶篇:3.1)表面处理
- Codeforces807 C. Success Rate
- 当APP被强杀了怎么办?
- Container架构与Hypervisor(VM)架构的对比
- 57. Insert Interval
- 打包APP时报错 linker command failed with exit code 1 (use -v to see invocation)
- 自己写的一个内存修改库CheatLibrary
- 服务优化之一(初始化数据压缩存储优化)
- 规则表达式文法
- Web AppBuilder for ArcGIS(开发版)系列教程 2
- Nginx详细安装部署教程(转)
- 第六天-2017-05-08
- jsp 乱码问题
- Oracle 11g ORA-12560错误