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

iOS

Help. 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

Hey 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;
}

Can you paste the code for us to see please.

Hey,

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

Also you may want to just delete Xcode and reinstall it.

Christian Thats the error message. I need the code in the main.m file.

Ok 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;
}

Not sure why but I can never the get code markdown to work correctly. Sorry about that.

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

You need to use backticks. The backtick key is located to the left of the number 1 key.

Example:

    ```objective-c
    // code goes here
    ```

You da man Amit! thanks!

Thanks Aaron!

Anytime!