• 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
Re: Garbage Collection Pre-Processor Flag
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage Collection Pre-Processor Flag


  • Subject: Re: Garbage Collection Pre-Processor Flag
  • From: Marcel Weiher <email@hidden>
  • Date: Tue, 22 Jul 2008 09:48:33 -0700


On Jul 22, 2008, at 9:21 , Jonathon Mah wrote:

Are Xcode build settings exposed as pre-processor variables? I know they're available when pre-processing Info.plists, but can't find a way to use them in source code files (.m).

It's not Xcode build settings, but gcc does have predefined macros that can tell you wether GC is on.


#ifdef OBJC_GC
#error This code doesn't support garbage collection
#endif

Try it with

#if	__OBJC_GC__

This also shows up when getting the list of pre-defined macros via

	cpp -ObjC -fobjc-gc  -dM < /dev/null

Cheers,

Marcel


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Garbage Collection Pre-Processor Flag (From: Jonathon Mah <email@hidden>)

  • Prev by Date: Re: SBApplication error with iTunes 7.7
  • Next by Date: Binding TableColumn Programatically
  • Previous by thread: Garbage Collection Pre-Processor Flag
  • Next by thread: Exception thrown when calling NSConnection connectionWithReceivePort:sendPort:
  • Index(es):
    • Date
    • Thread