从框架禁用Xcode中的警告 [英] Disable warnings in Xcode from frameworks

查看:78
本文介绍了从框架禁用Xcode中的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将three20项目导入到我的项目中,并且当我使用iOS 5升级到Xcode 4.2时,项目中出现了一堆警告。

I have imported the three20 project into my project, and when I upgraded to Xcode 4.2 with iOS 5, a bunch of warnings appeared in the project.

我不在乎它们,但它们会发出很多噪音,现在很容易错过我项目中的任何实际警告。有没有一种方法可以为那些特定的库禁用警告?

I don't care about them, but they make a lot of noise, and it's easy to miss any real warnings in my project now. Is there a way to disable warnings for those specific libraries?

推荐答案


  1. 如果您的第三个党库被添加为一个单独的目标,您可以为该特定目标选中禁止所有警告以关闭所有警告。

如果将库作为纯源文件添加到当前目标,则可以为单个源设置 -w 编译器标志,以使它们中的所有警告静音。您必须转到目标配置的构建阶段菜单,并在编译源部分为每个源文件设置此标志。通过双击每个文件结尾并输入 -w 标志。

If your library is added as plain source files to your current target, you can set -w compiler flag for individual sources to mute all warnings in them. You have to go to Build phases menu of your target configuration and set this flag for each source file in Compile Sources section by double clicking on each file end entering -w flag.

这篇关于从框架禁用Xcode中的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆