Hector,

At 10:33 AM 1/11/00 -0600, Jun-Kiat Lam wrote:
>In CodeWarrior you would need to use separate targets for debug and release
>builds, instead of debug flags ala makefiles. Create a new target (select
>from the Project menu), clone the existing target and you can set the new
>target to have its own settings, optimization levels, etc. etc. for
>debugging purposes. If necessary, you can also have different sources.

Another way to do conditional compilation is to put the appropriate #ifdefs
in your code and then put (or don't put) the relevent defines in a prefix
file.  The prefix file is just a header file specified in the C/C++
Language settings for your project.  For example:

// Prefix.h
#define DEBUG

// Source.c
#ifdef DEBUG
// Do some debug stuff
#endif

You can then comment out the #define DEBUG from Prefix.h to disable
debugging code.

Hope this helps.

Regards,
Greg

Greg Winton
Bachmann Software and Services, LLC
http://www.bachmannsoftware.com
Software for Handheld & Wireless Computing
Authors of "Palm Programming", published by Macmillan/Sams
Home of Bachmann Print Manager, the only graphical printing solution for
the Palm
Computing Platform

Reply via email to