At 05:47 PM 12/16/99 -0500, you wrote:
>I have written a small palm app that is getting large.  I would like to
>split it up into functional .c files and their associated headers.  I cannot
>seem to get this to work in the Metrowerks IDE.  I keep getting "precompiled
>header" errors when I include <Pilot.h> in multiple files and other erros
>(of course) when I take it out.  An example of how to do this would be very
>helpful.  The examples that came with Metrowerks Lite, MemoPad and SubHunt
>are both just one large ugly source file.

Dan,

The problem is that you can't include "Pilot.h" twice without getting this
header.  What I've done is to create a wrapper header - "MyPilot.h":

        #ifndef MYPILOT_H
        #define MYPILOT_H

        #include <pilot.h>

        #endif          // #ifndef MYPILOT_H

I never directly include "pilot.h", only "MyPilot.h".  The MYPILOT_H macro
prevents multiple includes of "pilot.h", and the related errors.

Hope this helps.

Greg

Greg Winton
Bachmann Software and Services, LLC
mailto:[EMAIL PROTECTED]
http://www.bachmannsoftware.com

Reply via email to