I've set up debug and release macros for my project in CodeWarrior
through precompiled headers. You create two precompiled headers, then
in the target settings, specify the precompiled header belonging to
the target. Within your precompiled headers, you can specify whatever
macros you like, and they will only apply to the relevant target. Of
course, you need to setup a file to generate these precompiled
headers, and you should set these per target so that each target only
includes the relevant one.

This will amount to the same thing as simply including a normal header
based on the target, but has the benefit of not needing to process the
header over and over.

Adrien.

Wednesday, November 10, 2004, 10:06:07 AM, you wrote:

PE> Hi,

PE> Creating a new CW project creates 2 targets: Debug and Release.  How do I 
add
PE> debugging code to the Debug target?  Is there a symbol defined ("DEBUG"?) 
that
PE> I use, or is it a matter of having one file (that defines "DEBUG") included 
in
PE> one target and not in the other?  What are my options?

PE> I want to do something like this:
PE> #ifdef DEBUG
PE>     x = 1;
PE> #else
PE>     x=2;
PE> #endif

PE> Thanks,
PE> Peter




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to