Evil precompiled headers. Without fail, I always bump into this problem.
Here's what I do to fix it:
1) Make a new file:
// build.h -- build rules
#ifndef PILOT_PRECOMPILED_HEADERS_OFF
#define PILOT_PRECOMPILED_HEADERS_OFF
#endif
2) Save this in your project path somewhere
3) Go to your project settings. In Language Settings : C/C++ Language :
Prefix File, type in build.h and rebuild your project. I think this
basically makes the stuff in build.h take precidence over all other
#includes and stuff. In other words, you disable the use of precompiled
headers for your project. No big loss, I never trust PCH's anyway.
I honestly don't know what's going on with those damned precompiled headers.
I -always- do this on the start of any new project as one of the many Stupid
Codewarrior Tricks you just gotta do (like commenting out the unused 'Err
err;' declaration in Starter.cpp to avoid compiler nagging). It's either
that, or try to figure out what's going wrong with your precompiled headers.
Yuck!
Good luck,
-Jeff Ishaq
Vanteon
> -----Original Message-----
> From: David Heil [mailto:
> Sent: Wednesday, February 23, 2000 6:50 PM
> To: Palm Developer Forum
> Subject: "illegal use of precompiled header": what does this mean?
>
>
> I have a module, commser.c and commser.h, with serial
> communications functions. In the commser.c file I have the following:
>
> #include "convert.h"
>
> In convert.h there are two function prototypes:
>
> #ifndef _CONVERT_H_
> #define _CONVERT_H_
>
> unsigned char hexchar2bin( char hexchar );
> void *hex2bin( void *binmem, void *hexstr, unsigned int hexstr_len );
>
> #endif
>
> When I try to build the project, the compiler stops at the
> second prototype (hex2bin) with the error message "illegal
> use of precompiled header", and underlines the semicolon at
> the end of the prototype. If I change the sequence so that
> hex2bin comes first, then it stops at hexchar2bin with the
> same error message.
>
> Does anyone know what this error message is trying to say?
> I'm using the C version of stationery in CW R6.
>
> Dave Heil
> Preco Electronics
> 208-322-4288
> [EMAIL PROTECTED]
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palm.com/devzone/mailinglists.html
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html