加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Objective-C ARC和Legacy Runtime编译错误

发布时间:2020-12-16 04:51:20 所属栏目:百科 来源:网络整理
导读:我正在尝试使用 Xcode 4.6编译源代码,用于32位架构,但是收到此错误: error: -fobjc-arc is not supported on platforms using the legacy runtimeCommand /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang f
我正在尝试使用 Xcode 4.6编译源代码,用于32位架构,但是收到此错误:
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.

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读