"ThuNguyet Nguyen" <[EMAIL PROTECTED]> wrote in message news:77509@palm-dev-forum... > > Hi everyone, > > I am using CW8 on Win98 machine. I make a new project using "Palm OS Application Stationary" (C++ > project). I change the filename of Starter.cpp to PyroMain.cpp. The application works fine. Then I > add some forms, and add another file (PyroApp.cpp) to the project. > > AudioFormHandleEvent(EventType*) and FileSysFormHandleEvent(EventType*) are defined in > PyroApp.cpp. The function prototypes are in PyroApp.h and I do include it in PyroMain.cpp. > > When I make a call to these functions, I get the Link Error as following: > Link Error : PyroMain.cpp: 'AudioFormHandleEvent(EventType*)' referenced from > 'AppHandleEvent(EventType*)' is undefined. > Link Error : PyroMain.cpp: 'FileSysFormHandleEvent(EventType*)' referenced from > 'AppHandleEvent(EventType*)' is undefined. > > I put all the code in PyroMain.cpp. The project with one file works OK. > > I did the same thing many times before (CW6) without any problem. > I think I must have a wrong setting somewhere but I don't know how to fix it. Please help me.
Do both of your source files have a .cpp extension? If you built one as a C file and the other as a C++, they won't link together by default. The language used for your files should match, or else you need to use 'extern "C"' a lot to make the C++ definitions match the calls from C files. My other suspicion is that you've declared your functions as static. Static code can only be called from the file in which its defined -- that is the point of static on functions -- they prevent you from getting functions put into the global namespace when you don't want that. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
