• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
gcc 3.3 and 10.3 features
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc 3.3 and 10.3 features


  • Subject: gcc 3.3 and 10.3 features
  • From: Alexander von Below <email@hidden>
  • Date: Thu, 24 Aug 2006 14:40:25 +0200

Hello list,

I am not sure if this is the correct list, but I think this touches on xcode tools as much as it does on Cocoa.

Because I would like to maintain 10.2 compatibility for my binary, my PPC code is compiled with gcc 3.3. Now I compile the following with gcc 3.3 and the 10.2.8 SDK (on PPC):

myArray = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObject:@"foo" forKey:@"bar"],
[NSDictionary dictionaryWithObject:@"faz" forKey:@"bar"],
nil];

result = [myArray valueForKey:@"bar"];


NSLog ([result description]);

When I run this code on a 10.4 system, the result is an uncaught exception that myArray "is not key value coding-compliant for the key bar"

But here it gets interesting: If I change the compiler to gcc 4 (leaving the SDK at 10.2.8), the code works as expected.

I originally thought I could be lazy and keep this code in the main binary, checking for 10.3 (or later) at run time (1). It seems I will have to create a loadble bundle for this, but would anybody know why it works with gcc 4, and not 3?

Alex

1) the feature would simply not be available for 10.2 users
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: gcc 3.3 and 10.3 features
      • From: Thomas Davie <email@hidden>
  • Prev by Date: Re: How to not include function names in dylib?
  • Next by Date: Re: gcc 3.3 and 10.3 features
  • Previous by thread: Re: Testing async code with OCUnit
  • Next by thread: Re: gcc 3.3 and 10.3 features
  • Index(es):
    • Date
    • Thread