ios5 ARC什么是编译标志从ARC中排除文件? [英] ios5 ARC what is the compiler flag to exclude a file from ARC?

查看:111
本文介绍了ios5 ARC什么是编译标志从ARC中排除文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

-fno-objc-arc

任何人都可以帮助我记住什么是标志告诉XCode不使用ARC的某些文件?我有我的项目中有几个文件标记为这样...直到我添加了另一个文件,并决定将这一个转换为ARC。听起来很容易,对吧?我希望我能够简单地检查一个我想要的文件,让XCode做它的魔法。好吧,不那么容易,在预检查它剥离所有-Noarc标志从文件,现在我需要手动重新应用标志到几个文件。

Can anyone help me remember what was the flag to tell the XCode to not use ARC for some file? I had several files in my project marked as such... Until I added another file and decided to convert that one to ARC. Sounds easy, right? I expected that I would be able to simply check a file that I want and let the XCode do it's magic. Well, not so easy, during pre-check it stripped all -Noarc flags from the files and now I need to manually re- apply the flag to several files.

这个故事的道德是:一旦你的项目是在ARC,你有一些文件标记为没有ARC,不要重新运行转换为ARC工具从重构>转换为ARC。即使预检查失败,也无法恢复您的设置。

the moral of this story is: once your project is in ARC and you have some files marked as no ARC, do not re-run the convert to ARC tool from Refactor>Convert to ARC. It will not restore your settings even if pre-check fails.

推荐答案

我发现答案:要从ARC中排除文件,请使用 -fno-objc-arc flag in build phases> compile sources

I found the answer: to exclude the file from ARC, use the -fno-objc-arc flag in build phases>compile sources

这篇关于ios5 ARC什么是编译标志从ARC中排除文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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