At 09:10 2003-1-6 -0500, you wrote:
new and delete can be defined in several ways. There is an implementation in the PalmOS_Runtime lib files, but the shared library wizards only includes one runtime source file by default.Dear All,I am using the Palm OS Shared Library Wizard of CodeWarrior 8.0 to create a shared library. I need to wrap several classes and their member methods written in C++ in this shared library project. I am tring to call the method functions of the classes in my wrapper functions as the entries for the shared library dispatch table. However, I got link error saying the "new" and "delete" are not defined as some of the method functions uses them.
You can try adding PalmOSRuntime_2i_A5.lib to your project file, and you'll pull in the correct definitions of new and delete. You shouldn't get anything else from the runtime, since shared libraries have their own entry point.
Static libraries are just collections of unlinked code -- the .lib files included with CW are made using this mode.I go to project setting, 68K Target setting, and set the Project Type from Palm OS Code Resourse to Palm OS Static Library, and build the project again. For this change, I don't get the link error complaining about "new" and "delete". But it's wrong to do this because the Project Type of shared lib is required to be set as Palm OS Code Resourse.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
