At 22:51 2003-1-18 -0800, you wrote:
I've been on eScribe, and I still don't get it.  How
do I use precompiled headers?  (From what I understand,
they are basically put at the top of every compiled file.)
I think you are confusing prefix files with precompiled headers.

A precompiled header is basically a compiler state dump. This is only possible when the compiler has only seen definitions, declarations, templates, and inline functions, but nothing that would actually generate code. Normally, you would put all that you want the compiler to remember in a .pch file (or .pch++ if you want to compile as C++), then add the line

#pragma precompile_target "output_file"

where output_file was replaced with the name of the file that will save this state.

A prefix file is a file that acts as if it was #included immediately before compilation of every file in a target. This prefix can either be a plain include file or a precompiled header file.

I made a file called "Config.pch".  I added this file to
BuildHeaders.mcp.  I built that project to make "Config"
(using #pragma precompile_target "Config" in Config.pch).
I then put this into the C/C++ Language Prefix File spot.
Did you put "Config.pch" or "Config" in the prefix setting?

Compiling with that, I now get about a zillon errors about
things not being defined.  What am I doning wrong?
I'm not sure. The body of "Config.pch" you provided looked OK, since it seemed to be based on existing files like "PalmOS.win.pch". A quick note: most CW precompiled headers are output with a .mch extension. PalmSource's SDK's use of an extensionless file isn't traditional, although it is allowed. Verify that you have a file called "Config" out on your disk, and that it is set as the prefix file for your target.


--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com

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

Reply via email to