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
Christian Opalinski
6,853 PointsHelp. PLease!
Hey,
I've been trying to run the MyFirstObjectiveC file in xcode, but it fails to compile with this error appearing :" Clang_LLVM 1.0 error -fobjc-arc is not supported with fragile abi."
Is this because I am running an older version of xcode. If so, is there anything I can do to fix this with mac osx 10.6.8?
thanks!
6 Answers
Christian Opalinski
6,853 PointsHey Aaron,
Thanks for the help. The main.m file in the MyFirstObjectiveCProgram looks like this:
// // main.m // MyFirstObjectiveCProgram // // Created by turner on 9/26/13. // Copyright (c) 2013 treehouse. All rights reserved. //
#import <Cocoa/Cocoa.h> #import "Sphere.h"
int main() { Sphere *ball = [[Sphere alloc] init];
[ball setRadius:25];
NSLog(@"ball radius %f", [ball radius]);
return 0;
}
agreatdaytocode
24,757 PointsCan you paste the code for us to see please.
Christian Opalinski
6,853 PointsHey,
Thanks for the quick response!
As soon as I open the file I get the following :
MyFirstObjectiveCProgram Group
Target Integrity Group
Mac OS X Deployment Target '10.8' is newer than SDK 'Mac OS X 10.6' in target
MyFirstObjectiveCProgram
Clang LLVM 1.0 Error Group
error: -fobjc-arc is not supported with fragile abi
Uncategorized Group
Mac OS X deployment target '10.8' for architecture 'i386' and variant 'normal' is greater than the
maximum value '10.6' for the Mac OS X 10.6 SDK.
Mac OS X deployment target '10.8' for architecture 'i386' and variant 'normal' is greater than the
maximum value '10.6' for the Mac OS X 10.6 SDK.
I tried changing the Base SDK to 10.6, but the "Clang LLVM 1.0 Error" still occurs.
Any help is much appreciated !
Thanks
agreatdaytocode
24,757 PointsAlso you may want to just delete Xcode and reinstall it.
agreatdaytocode
24,757 PointsChristian Thats the error message. I need the code in the main.m file.
agreatdaytocode
24,757 PointsOk I see you have two #import before "Sphere.h" remove one of them. It should look like this:
#import <Cocoa/Cocoa.h>
#import "Sphere.h"
int main()
{
Sphere *ball = [[Sphere alloc] init];
[ball setRedius:25];
NSLog(@"ball radius %f", [ball radius]);
return 0;
}
agreatdaytocode
24,757 PointsNot sure why but I can never the get code markdown to work correctly. Sorry about that.
Amit Bijlani
Treehouse Guest TeacherYou need to use backticks. The backtick key is located to the left of the number 1 key.
Example:
```objective-c
// code goes here
```
agreatdaytocode
24,757 PointsYou da man Amit! thanks!
Christian Opalinski
6,853 PointsThanks Aaron!
agreatdaytocode
24,757 PointsAnytime!