> I tried to set the form event handler which is written in a seperate C
file
> and its declaration is written in its corresponding H file. The H fle has
> already been included in the C file which call the Form Event Handler.
> Everjthing seems alright. But I still got a error message "Link Error :
> Starter.cpp: 'NewFormHandleEvent(EventType*)' referenced from
> 'MainFormHandleEvent(EventType*)' is undefined." How can I solve this
> problem? I have alrady tried many times...., please help!!!
Bet you have not read the FAQ though, or a decent book on C for that matter,
and you certainly have not trawled the archives. But it is Friday, and at
least you have shown us some code, so here you go:
> Thanks
> Oscar
>
> Here is my code
> //-----------------------------------------------------------------------
> In Starter.c
>
> #include "a.h"
> FormPtr pForm = FrmInitForm( NewForm );
> FrmSetEventHandler( pForm, NewFormHandleEvent );
>
> //-----------------------------------------------------------------------
> In a.cpp
>
> #include "a.h"
>
> static Boolean NewFormHandleEvent(EventPtr eventP)
Boolean NewFormHandleEvent(EventPtr eventP)
> {
> Boolean handled = false;
> return handled;
> }
>
> //-----------------------------------------------------------------------
> In a.h
>
> static Boolean NewFormHandleEvent(EventPtr eventP);
extern Boolean NewFormHandleEvent(EventPtr eventP);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/