Objective-C ARC和Legacy Runtime编译错误 [英] Objective-C ARC and Legacy Runtime compiling error

查看:343
本文介绍了Objective-C ARC和Legacy Runtime编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用Xcode 4.6编译源代码,为32位架构,但得到这个错误:

I'm trying to compile sources with Xcode 4.6, for 32bit architecture, but getting 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

有什么问题?

推荐答案

您正在将ARC(自动引用计数)与较旧的Objective-C 1.0运行时(不支持ARC)混合。

You're mixing ARC (automatic reference counting) with the older Objective-C 1.0 runtime, which does not support ARC.

OSX上的32位应用程序, 1.0运行时,因此您必须为您的项目禁用ARC,并使用手动引用计数。

32-bit apps on OSX, automatically use the 1.0 Runtime, so you'll have to disable ARC for your project, and use Manual Reference Counting.

这篇关于Objective-C ARC和Legacy Runtime编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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