Xcode7升级到Xcode8之后遇到文件冲突
2016-09-19 10:49
232 查看
UP主今天升级了XCode到8之后,打开了工程就崩溃了。。。,看错误代码
分析了一下,是PCCircleInfoView这个文件引入重复,和其他247个文件有冲突,但是神奇的是。Complie Souces 引入了248个文件,也就是我这个文件和所有文件有冲突。
凌乱的我就在网上开始找问题,后来看到一种可能,是因为这个文件中的某一变量或者某一方法名和其他某一文件的变量名或者方法有重复同名,就找到了解决方法:
在Build Setting里面 NO Common Blocks 设置为NO,就解决问题了,那么“NO Common Blocks”是什么呢?
官方的解释是:
In C, allocate even uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern ) in two different compilations, you will
get an error when you link them. The only reason this might be useful is if you wish to verify that the program will work on other systems which always work this way.
在C语言中,在目标文件的数据段分配甚至未初始化的全局变量,而不是生成它们作为公共块。这样做,如果同一个变量被声明(没有extern)放在两个不同的汇编,你会当你将它们链接得到一个错误的影响。这可能是有用的唯一原因是,如果你想验证程序将在其他系统上,它总是以这种方式工作工作。
凌乱的我就在网上开始找问题,后来看到一种可能,是因为这个文件中的某一变量或者某一方法名和其他某一文件的变量名或者方法有重复同名,就找到了解决方法:
在Build Setting里面 NO Common Blocks 设置为NO,就解决问题了,那么“NO Common Blocks”是什么呢?
官方的解释是:
In C, allocate even uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern ) in two different compilations, you will
get an error when you link them. The only reason this might be useful is if you wish to verify that the program will work on other systems which always work this way.
在C语言中,在目标文件的数据段分配甚至未初始化的全局变量,而不是生成它们作为公共块。这样做,如果同一个变量被声明(没有extern)放在两个不同的汇编,你会当你将它们链接得到一个错误的影响。这可能是有用的唯一原因是,如果你想验证程序将在其他系统上,它总是以这种方式工作工作。
相关文章推荐
- Xcode7升级到Xcode8之后遇到文件冲突
- Xcode7升级到Xcode8之后遇到文件冲突
- Xcode7升级到Xcode8之后遇到文件冲突
- 升级Xcode7之后如果遇到下面的错误
- xcode8升级之后项目遇到了问题
- 升级到xcode7之后ipa文件尺寸增大,strip无效问题
- Xcode8升级之后遇到的一些坑
- Xcode8升级之后遇到的问题
- 升级Xcode8之后 XMPP 遇到重定义的问题 Redefinition of module 'dnssd'
- 升级xcode7之后原有项目无法连网的解决方案
- Oracle升级遇到文件被占用
- Oracle技术之32位升级到64位之后迁移oracle db遇到的问题
- iOS开发----Xcode7升级之后插件无法使用与不小心点击Skipbundle的解决办法
- Xcode7 更新之后遇到的新问题
- 在调用FileOutputStream的close方法之后立刻移动或操作文件会遇到文件被占用的问题
- 关于升级Xcode7后真机测试项目遇到的问题总结
- 升级Xcode7遇到的问题及解决办法
- 升级Xcode7后 .a文件报 Library not found for XXX .a 解决办法
- 升级xcode7 和 iOS9 后遇到的问题以及解决方案
- 升级xcode7之后,真机调试出现BaiduMapAPI.framework/BaiduMapAPI(BMAddrList.o)' does n 4000 ot contain bitcode的问题