Re: DEUG vs RELEASE
Re: DEUG vs RELEASE
- Subject: Re: DEUG vs RELEASE
- From: Sandro Noel <email@hidden>
- Date: Mon, 8 Oct 2007 17:53:05 -0400
thank you for all your answers
Is there a way to DEFINE these in the Build configuration ?
Sandro Noel
email@hidden
On 8-Oct-07, at 5:11 PM, Uli Kusterer wrote:
Am 08.10.2007 um 22:57 schrieb Sandro Noel:
I want to do some console logging when i'm in debug mode.
but in release, of course, none (xept errors).
in delphi i used to check it like this
#IFDEF DEBUG
// do my debug related code here
#ENDIF
is there such an easy way to do it in Xcode ?
Not quite, I think, but you can use the "Preprocessor Macros"
build setting to define these constants (set it to "DEBUG=1
RELEASE=0" and vice versa, for example), and you can do so
separately for the Release and Debug build configurations. And then
you can do
#if DEBUG
#define dprintf(...) printf(__VA_ARGS__)
#else
#define dprintf(...) // nothing
#endif
and the likes.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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