Xcode-OSX错误:使用旧版运行时的平台不支持-fobjc-arc [英] Xcode - OSX error: -fobjc-arc is not supported on platforms using the legacy runtime

查看:62
本文介绍了Xcode-OSX错误:使用旧版运行时的平台不支持-fobjc-arc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将XCode 4.6.1与OSX 10.8.5一起使用.我尝试编译一个项目,但出现此错误

I am using XCode 4.6.1 with OSX 10.8.5. I tried to compile a project but got this error


error: -fobjc-arc is not supported on platforms using the legacy runtime    
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

我试图像将其OSX部署目标从10.9解析到10.8一样解决它,但没有成功,然后也尝试了 XCode中的Clang错误

I tried to resolve it like its OSX deployement target to 10.8 from 10.9 but did not worked then tried this as well Clang Error in XCode

但不起作用.请任何想法或帮助表示赞赏.

but not working. Please any idea or help appreciated.

推荐答案

我认为,如果您的项目被Xcode 5修改并且回到Xcode 4.6并尝试构建,那么在构建时会出现这样的错误,因为Xcode 5可以删除一些会导致Xcode 4.6意外结果的事情.但这听起来似乎主要适用于OS X项目,而不适用于iOS项目,所以我对为何iOS会发生这种情况感到困惑.我建议尝试使用Xcode 5构建项目,以查看是否可以解决问题.

I think you can get an error like this when building if your project was modified by Xcode 5 and you went back to Xcode 4.6 and tried to build, because Xcode 5 can remove some things that will cause unexpected results on Xcode 4.6. But it sounds like this mainly applies to OS X projects and not iOS ones, so I'm confused as to why this would happen for iOS. I would suggest trying to build your project with Xcode 5 to see if that resolves the issue.

如果您查看

If you take a look at this, you can see a long explanation for the reason that this happens. But basically Xcode 5 has a different "default" for some compiler settings than Xcode 4.6, and Xcode 5 recommends removing certain settings sometimes because of this, which makes Xcode 4.6 behave differently.

一个很好的解决方案是创建一个新项目并将文件移到另一个位置,因为这听起来可能使您的项目弄乱了(因为它显示了可能是iOS项目的OS X的选项).如果您的项目处于源代码控制之下,并且您不想废弃当前的存储库和修订历史记录,则可以始终创建一个新项目并比较项目文件,以查看它与干净的Xcode 4.6项目之间的区别.

A good solution, since it sounds like something might have gotten messed up with your project (since it's showing options for OS X for a supposedly iOS project), is to create a new project and move your files over. If your project is under source control and you don't want to scrap your current repository and revision history, you could always create a new project and compare the project files to see what differs between it and a clean Xcode 4.6 project.

这篇关于Xcode-OSX错误:使用旧版运行时的平台不支持-fobjc-arc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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