• 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: #define and #ifdef statements for different build configs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >#define and #ifdef statements for different build configs (From: "Carter R. Harrison" <email@hidden>)

  • Prev by Date: Re: #define and #ifdef statements for different build configs
  • Next by Date: Re: Trashing files and undo
  • Previous by thread: Re: #define and #ifdef statements for different build configs
  • Next by thread: starting external program at runtime
  • Index(es):
    • Date
    • Thread