• 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
Use of preprocessor macros
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use of preprocessor macros


  • Subject: Use of preprocessor macros
  • From: Graham Cox <email@hidden>
  • Date: Wed, 2 Dec 2009 11:59:53 +1100

Just a quickie.

I'm defining a preprocessor macro in the 'GCC 4.2 - Preprocessing / preprocessor macros' section of my project's build properties, e.g. foo=1. This is set only in the debug version.

But when I try and use it in the source code, as in #if foo ...  #endif I get 'foo is not defined'.

What should I be doing? I need to conditionally compile in some code in the debug version and leave it out in the release version.


--Graham



_______________________________________________

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

  • Follow-Ups:
    • Re: Use of preprocessor macros
      • From: Rob Keniger <email@hidden>
    • Re: Use of preprocessor macros
      • From: Marco S Hyman <email@hidden>
    • Re: Use of preprocessor macros
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: [NSWindow document]?
  • Next by Date: Re: How do I bind ManagedObject's relationships to a view?
  • Previous by thread: Re: Key path help for complex binding
  • Next by thread: Re: Use of preprocessor macros
  • Index(es):
    • Date
    • Thread