• 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: #ifdef/build style question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #ifdef/build style question


  • Subject: Re: #ifdef/build style question
  • From: Scott Stevenson <email@hidden>
  • Date: Thu, 6 Jan 2005 12:16:05 -0800


On Jan 6, 2005, at 10:26 AM, patrick wrote:

I'd like to have debug code in my application like:

#ifdef DEBUG_ON
NSLog(@"This is a debug message");
#endif

And DEBUG_ON would be defined in my Development build style. I've
added such a setting into the build style, but it would appear that
this is not the same as if I were using "make -DDEBUG_ON ...". Is
there a way to reference these settings in the build styles to control
what gets compiled in?

I think your best bet is:


Development Build Style

	Other C Flags:   ${OTHER_CFLAGS} -DDEBUG_ON=1

Your Target:

	Other C Flags:   -DSOMETHING_TARGET_SPECIFIC=1


I find the UI a bit unclear in that the Build Style and Target seem to override each other for "Other C Flags" (as strange as that sounds). This is probably either a cosmetic or documentation bug. The only solution I've found is the above.


I originally tried the "Preprocessor Defines" build setting but I don't think it worked as I expected.


- Scott

--
http://treehouseideas.com/
http://theocacao.com/ [blog]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: #ifdef/build style question
      • From: patrick <email@hidden>
References: 
 >#ifdef/build style question (From: patrick <email@hidden>)

  • Prev by Date: Re: #ifdef/build style question
  • Next by Date: Re: Ignore accents when comparing strings
  • Previous by thread: Re: #ifdef/build style question
  • Next by thread: Re: #ifdef/build style question
  • Index(es):
    • Date
    • Thread