In a.h, replace 'static' with 'extern'.
In a.cpp, remove 'static'
- geoff
"Oscar" <[EMAIL PROTECTED]> wrote in message
news:41979@palm-dev-forum...
>
> Dear All,
>
> 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!!!
>
> Thanks
> Oscar
>
> Here is my code
>
file://---------------------------------------------------------------------
--
> In Starter.c
>
> #include "a.h"
> FormPtr pForm = FrmInitForm( NewForm );
> FrmSetEventHandler( pForm, NewFormHandleEvent );
>
>
file://---------------------------------------------------------------------
--
> In a.cpp
>
> #include "a.h"
>
> static Boolean NewFormHandleEvent(EventPtr eventP)
> {
> Boolean handled = false;
> return handled;
> }
>
>
file://---------------------------------------------------------------------
--
> In a.h
>
> static 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/