Hi

        I assume AppHandleEvent is in starter, and you include MainForm.h in
starter. If so then in MainForm.h you need to have the function
prototype/definition for MainFormHandleEvent in the .h file ie.

         Boolean MainFormHandleEvent(EventPtr eventP);

        This is because otherwise the linker does not know what the function
looks like when called from starter, and cannot link.

        Ensure that you dont put "static" in front of it.

        This a a C problem and not Palm problem. If you find yourself a book
that deals with multiple modules (c files) then it will explain all about
"static", "extern" etc and how data can be accessed between multiple files.
Its very easy once you have worked it out. 

        Rik

> -----Original Message-----
> From: Jim Duffy [SMTP:[EMAIL PROTECTED]]
> Sent: 03 August 2000 23:29
> To:   Palm Developer Forum
> Subject:      Link Error help needed
> 
> Hi everyone,
> 
> as a novice to C and C++ as well as palm programming.
> 
> I am working on my first palm program now which I started using the
> standard
> palm os 3.1 stationary provided in Code Warrior.
> 
> I have about 7 forms all working together fine.  I have been dumping all
> the
> related functions into the Starter.c file.
> 
> I am now trying to separate this file into smaller more organized files
> but
> having difficulty getting it to work.
> 
> right now I only moved the MainForm functions into a file named MainForm.c
> and then included all its defines into MainForm.h.
> 
> I then added both these files to the project and then added MainForm.h at
> the top of Starter.c
> 
> In addition, I also included all the other #includeds found at the top of
> Starter.c into MainForm.c and also included its own .h file.
> 
> All the file Compile with no trouble, but I keep getting a Link Error that
> says:
> 
> Starter.c Mai'nFormHandleEvent' referred from 'AppHandleEvent is
> undefined.
> 
> Does anyone know what might be causing this error or how to fix it???
> 
> My roomate (an experienced windows programmer) could not figure this out,
> so
> I am wondering if it has something to do with Code Warrior itself.
> 
> 
> Thank you very much for the help and I apologize for this kind of long
> post.
> 
> Jim
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/

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

Reply via email to