Objective-C Error compiling ARC and Legacy Runtime

I am trying to compile sources with Xcode 4.6 for a 32-bit architecture, but I get 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 

What's wrong?

+7
source share
2 answers

You mix ARC (automatic reference counting) with an older version of Objective-C 1.0 that does not support ARC.

32-bit OSX applications automatically use 1.0 Runtime, so you will have to disable ARC for your project and use the account manually.

+14
source

This issue has recently appeared because Xcode 5 removes the ARCHS parameter - if you enable it. But if you have a build server with Xcode 4, this is the default value for building 32 and 64 bits, which does not work if you have ARC enabled.

See my post for a more detailed explanation.

+1
source

All Articles