RE: #define and #ifdef statements for different build configs
RE: #define and #ifdef statements for different build configs
- Subject: RE: #define and #ifdef statements for different build configs
- From: Andy Klepack <email@hidden>
- Date: Fri, 11 Jul 2008 08:38:24 -0700
- Acceptlanguage: en-US
- Thread-topic: #define and #ifdef statements for different build configs
What I've always done is to have that block in code like
#ifdef RELEASE
{ ... code ... }
#endif
and then, in the build configuration of either the project or target, I select the Release configuration and add the pre processor macro "RELEASE". I forget the setting name exactley, but it's along the lines of "other preprocessor macros" but it's pretty easy to find.
There may well be a better way to do this, but this approach has worked fine so far.
-Andy
________________________________________
From: cocoa-dev-bounces+andy.klepack=email@hidden [cocoa-dev-bounces+andy.klepack=email@hidden] On Behalf Of Carter R. Harrison [email@hidden]
Sent: Friday, July 11, 2008 8:01 AM
To: cocoa-dev list
Subject: #define and #ifdef statements for different build configs
I have an app that uses different frameworks and method calls based
upon the currently selected build configuration.
How can I easily setup an #ifdef statement that will only execute if
I've chosen the "Release" build configuraiton?
Thanks in advance.
_______________________________________________
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
_______________________________________________
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