Ok, I think I'm almost there. I had the .pch file and had
fixed the paths and such but wasn't using the resulting
.mch file as my prefix file. So, I just took what was my
prefix file and included it into the .pch file. Prefix.h
defines ERROR_CHECK_LEVEL, includes some of my library
headers and includes PalmOS.h. The .pch file is simply
this:
#include "Prefix.h"
#pragma precompile_target "Prefix.mch"
Then I changed the prefix filename in the C/C++ Language
panel to the .mch filename. Now however, the compiler
doesn't find some #defines I made in Prefix.h.
I know I'm close. How about that last little push?
TIA,
-- Paul
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> m]On Behalf Of Jun-Kiat
> Lam
> Sent: Wednesday, March 22, 2000 2:18 PM
> To: Palm Developer Forum
> Subject: Re: Precompiled headers HOWTO? (was 3.5
> SDK compiles slower)
>
>
> To create a precompiled header you can do this:
>
> 1. Create a new file with the suffix .pch e.g.
> MyPrecompiledHeader.pch
> 2. Add your #includes and other necessary stuff
> into the precompiled header
> e.g. in MyPrecompiledHeader.pch:
>
> #include <PalmOS.h>
>
> 3. Add the precompiled header target name and
> location using the pragma
> precompile_target:
>
> #include <PalmOS.h>
> #pragma precompile_target "Output/PalmOS.mch"
>
> 4. Add the precompiled header file (.pch) to
> your project. It will always be
> the first file built and will output the .mch
> file into the specified
> location. Your project will then use the
> specified .mch file to build the
> PRC. In the above example, assuming that you
> specified PalmOS.mch in your
> prefix file field, the compiler first
> precompiles the .pch file to get
> PalmOS.mch and then uses it in the building of the PRC.
>
> Hope this helps.
>
> Rgds,
> Jun-Kiat Lam
> Metrowerks Technical Support
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html