> From: Gaurav Palvia [mailto:[EMAIL PROTECTED]]
> I  have used some macros in my app like ErrFatalDisplayIf
> now i want to make these inactive so how i sould use 
> ERROR_CHECK_LEVEL.

You didn't say if you use CodeWarrior or GCC.  For CodeWarrior:

1. Make two build targets in your project, one Debug and one Release.

2. Make a precompiled header file for each project, named Debug.pch and
Release.pch in this example.  Set these up as the compiler prefix file for
each target.  (RTFM on the details of setting this all up.)

3. Make the precompiled headers roughly like this:

    // precompiled header file "Debug.pch"
    #define PILOT_PRECOMPILED_HEADERS_OFF
    #define ERROR_CHECK_LEVEL ERROR_CHECK_FULL
    #include <Pilot.h> // or <PalmOS.h> in 3.5
    #include <Any_Other_Needed_Headers_Here>

(Of course change ERROR_CHECK_LEVEL to ERROR_CHECK_NONE in Release.pch.)

4. It's a good idea to set compiler optimization for the targets too: full
optim for Release build; no opts (but A6 stack frames and MacsBug symbols
on) in Debug build.

4. Then you can build whichever version you need at any time, by switching
the selected target in the project window.

-slj-

Reply via email to