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

----- Original Message -----
From: "Paul A. Dugas" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, March 22, 2000 10:17 AM
Subject: Precompiled headers HOWTO? (was 3.5 SDK compiles slower)


> Forgive me for being thick here but could someone explain
> (in detail) the process of setting up use of precompiled
> headers with CW6?  I've got prefix files for my production
> and debug targets already setting the OS and application
> "defines".  I'd love to hear how this is supposed to be
> done as my builds have gotten fairly time consuming as the
> project progresses.
>
> TIA,
> -- Paul
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > m]On Behalf Of Bob
> > Ebert
> > Sent: Wednesday, March 22, 2000 10:44 AM
> > To: Palm Developer Forum
> > Cc: Palm Developer Forum
> > Subject: Re: 3.5 SDK compiles slower
> >
> >
> > At 4:04 PM +0100 22-03-00, Chris Yourch wrote:
> > >The 3.5 SDK compiles ALOT slower than the 3.1
> > SDK ever did.
> >
> > Probably the lack of precompiled headers.  You
> > could create them yourself...
> >
> > --Bob
> >
> >
> >
> > --
> > 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
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to