Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Build Error on "From Structs to Objects"

I opened the correct file and did exactly as the video instructed. The build keeps failing and I see no obvious faults.

The error reads "-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"

Please help me!

3 Answers


What version of Xcode are you running? It is trying to run ARC (Automatic Reference Counting) which I believe that track does not use.

You can verify if it is trying to use ARC by the following: Click on you project, in the left hand organizer. Select your target, in the next column over. Select the Build Settings tab at the top. Scroll down to "Objective-C Automatic Reference Counting" (it may be listed as "CLANG_ENABLE_OBJC_ARC" under the User-Defined settings group), and set it to NO.

Reference from http://stackoverflow.com/questions/7837024/how-to-disable-xcode4-2-automatic-reference-counting

Ah yes i just had an older version of Xcode! Thank you very much!