A simple test here seems to work for me. Can you send me your project to take a
look at? FYI, my example was based off the Palm OS 3.5 stationery, but with the
precompiled header file removed.

-- jkl

----- Original Message -----
From: "Horace Ho" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 3:24 PM
Subject: Re: #defines in "Prefix file" ofproject settings ignored


> Of course the #define XYZ is inside a .h file. The name of the .h file is
> entered in
> the Prefix File field.
>
> When I type some garbage in the .h file, the compiler complains the error.
>
> Thanks
> horace
>
> "Jim Schram" <[EMAIL PROTECTED]> wrote in message
> news:43663@palm-dev-forum...
>
> At 10:33 AM -0800 3/27/01, Horace Ho wrote:
> >Code Warrior 4.1.0.2 build 0646
> >
> >Added a #define XYZ in a .h file to the "Prefix File" field, under
> >C/C++ Language in project settings.
> >
> >However, codes between the:
> >
> >#ifdef XYZ
> >// ... codes here
> >#endif
> >
> >section in the .c source file are ignored.
> >
> >If I added the #define XYZ to the .c source file, the compiler returns
> >an "Macro redefinition" error.
> >
> >If I remove the #define XYZ from the .h file but only add #define XYZ
> >in the .c file, the #ifdef ... #endif section is working.
>
> Just to be certain I understand correctly... you did NOT type this #define
> into the field of the CodeWarrior C/C++ panel which specifies the prefix
> file name to use, but rather, you've added  #define XYZ  to the CONTENTS of
> the prefix file specified in the CodeWarrior C/C++ panel... yes? For every
> target in the project?
>
> Did you try putting some uncompilable garbage characters in your .h and .c
> files within your #ifdef...#endif directives to see if the prefix file is
> being parsed correctly or not? The compiler should complain when it hits
> those garbage characters if the #define is being activated correctly.
>
> Regards,
>
> Jim Schram
> Palm Incorporated
> Partner Engineering
>
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/
>


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

Reply via email to