简体   繁体   English

XCode 5.1上的突然警告

[英]Sudden Warning on XCode 5.1

I suddenly started getting this error after upgrading my Xcode 5.0.2 to Xcode 5.1 Xcode 5.0.2升级到Xcode 5.1后,我突然开始出现此错误

warning: ignoring debug info with an invalid version (0)

There are like 22 of these warnings coming up when compiling my code... 编译我的代码时,大约有22警告出现...

I haven't encountered anything like this before… Please can anyone help.. thanks in advance.. 我之前从未遇到过这样的事情……请任何人帮忙..在此先感谢..

In XCode target BuildSettings, search DEAD_CODE_STRIPPING and set Value to NO. 在XCode目标BuildSettings中,搜索DEAD_CODE_STRIPPING并将Value设置为NO。

This is a bug with LTO and -dead_strip. 这是LTO和-dead_strip的错误。 The workaround is to stop using one of them. 解决方法是停止使用其中之一。

way Link Time Optimization (LTO) works is that the compiler stops half way through and emits the .o file as "bit code" (the internal clang IR) instead of compiling down to mach-o. 链接时间优化(LTO)的工作方式是编译器中途停止,并将.o文件作为“位代码”(内部clang IR)发出,而不是编译为mach-o。 This is drive by the -flto compiler option. 这是由-flto编译器选项驱动的。 When the linker encounters bit-code .o files, it loads up the back end of clang (libLTO.dylib) and merges/compiles all the bit-code files into mach-o then completes the link. 当链接器遇到位代码.o文件时,它将加载clang的后端(libLTO.dylib),并将所有位代码文件合并/编译为mach-o,然后完成链接。

The Link 链接

Check files that are related to warnings. 检查与警告相关的文件。 If will be probably a third party library. 如果可能是第三方图书馆。 Try to recompile that lib with new Xcode. 尝试使用新的Xcode重新编译该lib。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM