真机运行没问题,打包报错:

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

iOS开发——打包报错error: linker command failed with exit code 1的更多相关文章

  1. iOS报错:linker command failed with exit code 1 (use -v to see invocation) 问题解决方式之一

    百度库原版本:3.2.1  更新为:4.2.0,两个库相隔2年时间: 问题i: 更新CocoaPods的同时更新了百度地图库的版本,运行程序报错: linker command failed with ...

  2. [问题]编译报错:clang: error: linker command failed with exit code 1及duplicate symbol xxxx in错误解决方法之一

    今天添加了一个新类(包括m,h,xib文件),还没有调用,-编译遇到如下错误,根据错误提示, duplicate symbol param1 in: /Users/xxxx/Library/Devel ...

  3. [报错]编译报错:clang: error: linker command failed with exit code 1及duplicate symbol xxxx in错误解决方法之一

    今天添加了一个新类(包括m,h,xib文件),还没有调用,—编译遇到如下错误,根据错误提示, duplicate symbol param1 in: /Users/xxxx/Library/Devel ...

  4. iOS cocoapods导入项目 出现 "___gxx_personality_v0", referenced from: 或者 clang: error: linker command failed with exit code 1 (use -v to see invocation) 错误

    今天想导入PNChart 编译的时候出现了  "___gxx_personality_v0", referenced from:  和 clang: error: linker c ...

  5. error: linker command failed with exit code 1 解决方法之一

    出现这种错误的原因可能很多,以下是我遇到的一种情况: 向项目中添加了新文件,没有加入compile source 编译报错: ld: symbol(s) not found for architect ...

  6. clang: error: linker command failed with exit code 1 (use -v to see invocation)

    报错提示: ... ld: 6 duplicate symbols for architecture x86_64 clang: error: linker command failed with e ...

  7. (转) error: linker command failed with exit code 1 (use -v to see invocation)

    转自:http://blog.csdn.net/tiantian1980/article/details/9175777   像这样的一大堆,总体说编译链接时错误 /Users/zhangtianji ...

  8. 使用SVN clang: error: linker command failed with exit code 1 (use -v to see invocation)

    然后上传到该项目SVN仓库上,例如,下面的错误再次发生再拉到本地编译 ld: library not found for -lxxxxxxxxxxxx clang: error: linker com ...

  9. "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:和clang: error: linker command failed with exit code 1 (use -v to see invocation)错误

    在项目中使用MWPhotoBrowser未导入ALAssetsLibrary类库时会导致编译时出现异常: "_OBJC_CLASS_$_ALAssetsLibrary", refe ...

随机推荐

  1. CxImage的使用及基本用法

    基本定义:CxImage类库是一个优秀的图像操作类库.它可以快捷地存取.显示.转换各种图像. 下载地址:http://www.codeproject.com/KB/graphics/cximage.a ...

  2. BZOJ 2127 二元关系

    题意: 思路: 先把所有的值加起来 最小割割哪儿 就代表那个地方不选 一减 剩下的就是 最大值了 //By SiriusRen #include <cstdio> #include < ...

  3. CSS弹性盒模型flex概念

    盒模型分为:标准w3c盒模型.IE盒模型.以及css中的伸缩盒模型. 先说CSS的伸缩盒模型:flex模型是CSS3引入的新的布局模型,是flexible box的缩写,一般称之为弹性盒模型.和CSS ...

  4. 学习es6 setter/getter研究

    1.背景 在ES6中,我们对类的定义如下 class Person { // 构造函数 constructor (name) { // 属性初始化 this.name = name; } // 成员方 ...

  5. 【原创】Apache和Tomcat实现动静分离

    集群中每个节点都启用了页面静态化功能,所以,为了防止单个节点刷新造成找不到页面问题,将每个节点刷新的页面都放入apache虚拟目录下,由apache统一来处理.静态页面由apache处理,动态页面仍然 ...

  6. Twilio介绍和使用

    1.Twilio是?需要如何才能通过Twilio打国际网络电话 http://uuxn.com/twilio-toll-free-sms介绍了通过网页来收取和发送信息 需求:通过TWILIO拨打国外座 ...

  7. Web前端为什么这么火爆?

    Web前端为什么这么火爆? 互联网发展到今天,全球已有28.9亿互联网用户,中国有355万网站,6.5亿网民,13亿手机用户,5亿微信用户,当步入互联网+时代后,互联网已经越来越复杂,纷繁复杂的互联网 ...

  8. Calling Mojo from Blink

    Variants Let's assume we have a mojom file such as this:   module example.mojom;   interface Foo {   ...

  9. [ZJOI2006]物流运输 最短路 动态规划

    Code: 定义状态 $dp[i]$ 为前 $i$ 天的最小代价. 状态转移为:$dp[i]=min(dp[i],dp[j]+spfa(j+1,i)$ 这里 $spfa(i,j)$ 是指 $(i,j) ...

  10. tab栏切换

    最简单的tab栏切换 html部分 <ul class="tab"> <li class="item">待支付(1)</li> ...