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

Re: Use of preprocessor macros


  • Subject: Re: Use of preprocessor macros
  • From: Rob Keniger <email@hidden>
  • Date: Wed, 2 Dec 2009 11:23:49 +1000

On 02/12/2009, at 10:59 AM, Graham Cox wrote:

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


This works fine for me. Are you sure you are compiling the build configuration you think you're compiling? Are you changing the preprocessor setting on the right target? Probably worth double checking.

--
Rob Keniger



_______________________________________________

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: Graham Cox <email@hidden>
References: 
 >Use of preprocessor macros (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Use of preprocessor macros
  • Next by Date: Re: Use of preprocessor macros
  • Previous by thread: Re: Use of preprocessor macros
  • Next by thread: Re: Use of preprocessor macros
  • Index(es):
    • Date
    • Thread