使用旧版运行时的平台不支持部署到OS X 10.6和"-fobj-arc". [英] Deploying to OS X 10.6 and "-fobj-arc is not supported on platforms using the legacy runtime"

本文介绍了使用旧版运行时的平台不支持部署到OS X 10.6和"-fobj-arc".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:

我正在为OS X构建一个应用程序,其部署目标为10.6.我还没有将应用程序完全转换为ARC,但是我添加了一些新的类,这些类将从ARC中受益,因此我为这些类设置了-fobj-arc编译器标志.

I'm building an app for OS X with deployment target of 10.6. I have not converted my app to ARC completely, but I am adding a few new classes which would benefit from ARC, so I have set the -fobj-arc compiler flag for those classes.

通用32/64位Intel 架构的编译失败,错误 -fobj-arc在使用旧版运行时的平台上不支持.

Compiling fails for Universal 32/64-bit Intel architecture, with error -fobj-arc is not supported on platforms using the legacy runtime.

仅针对64位构建成功.

Building for 64-bit only succeeds.

我不熟悉低级架构.我的问题是:仅针对64位Intel进行构建会有什么影响?这是否会阻止该应用完全在10.6上运行?还是只有某些运行10.6的计算机?

I'm not well versed in low level architecture. My question is: what is the effect of building for 64-bit Intel only? Does this prevent the app from running on 10.6 completely? Or only some machines running 10.6?

推荐答案

OS X的Objective-C的32位运行时非常老.当它们移至64位时,Apple更新了运行时,但对32位运行时并没有太大作用.

The 32-bit runtime of OS X's Objective-C is fairly old. Apple updated the runtime when they moved to 64-bit, but didn't do much with the 32-bit runtime.

仅针对64位构建:大多数Mac现在都具有64位处理器.但是,10.6确实也支持仅32位计算机:您留在尘土飞扬中.

As for building for 64-bit only: Most Macs have 64-bit processors in them now. However, 10.6 does support 32-bit-only computers as well: you will be leaving those users in the dust.

我创建了一个标头,该标头将有助于过渡到ARC,因为您可以在64位硬件上而不是在32位硬件上将目标ARC作为目标,两者都可以使用.但是,这确实违背了ARC的目的,因为您仍然需要管理保留和释放,在构建ARC代码时,它们只会被注释掉.

I have created a header that will help with the transition to ARC, in that you can target ARC on 64-bit hardware and not on 32-bit hardware and both will work. However, this really defeats the purpose of ARC, as you will still need to manage retain and release, they'll just be commented-out when building ARC code.

这篇关于使用旧版运行时的平台不支持部署到OS X 10.6和"-fobj-arc".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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