Re: Test for debug vs release

2010-03-21 Thread Greg Parker
On Mar 21, 2010, at 11:10 AM, Clark Cox wrote: > The presence or absence of NDEBUG is not defined by the C standard > *however* the behaviour of the assert macro, when *you* define NDEBUG, > *is* specified: > > "If NDEBUG is defined as a macro name at the point in the source file > where is inclu

Re: Test for debug vs release

2010-03-21 Thread Clark Cox
On Sun, Mar 21, 2010 at 11:01 AM, Don Quixote de la Mancha wrote: > You can also do: > > #if !defined( NDEBUG ) >    /* Debugging Stuff Goes Here *. > #endif > > I don't have an Xcode install handy to actually check (I'm > reinstalling my Mac today), but NDEBUG *should* be defined for release > bu

Re: Test for debug vs release

2010-03-21 Thread Don Quixote de la Mancha
You can also do: #if !defined( NDEBUG ) /* Debugging Stuff Goes Here *. #endif I don't have an Xcode install handy to actually check (I'm reinstalling my Mac today), but NDEBUG *should* be defined for release builds, and not defined for debug builds. The reason is that the assert macro in d

Re: Test for debug vs release

2010-03-20 Thread Jerry Krinock
On 2010 Mar 20, at 22:27, Gideon King wrote: > Go to your project Info panel, and make sure the debug configuration is > chosen. In the Language section add -DISDEBUGGING to the Other C Flags Yes; note that the leading -D is part of the syntax. I believe that DEBUG is somewhat conventional, i

Re: Test for debug vs release

2010-03-20 Thread Gideon King
Go to your project Info panel, and make sure the debug configuration is chosen. In the Language section add -DISDEBUGGING to the Other C Flags Then you will be able to use #ifdef ISDEBUGGING etc in your code. HTH Gideon On 21/03/2010, at 3:22 PM, BareFeet wrote: > Hi all, > > OK, I'm missi