Re: Use of preprocessor macros
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