Hi,
I could solve the linkage problem Link Error : __RuntimeModule__: 'TestSharedLibInstall' referenced from '__DummyStartup__' is undefined.
I just used the extern "C" before the function.
But i wasnt able to call the c++ class functions.lemme explain.
Think about what you are trying to do.
A Palm OS system shared library has all of its functions defined by system traps, where the first parameter to the system trap is a library reference. Basically, the OS does something like this:
SystemTrapHandler:
if (trapNumber >= sysLibTrapBase && trapnumber <= sysLibTrapBase + MAXLIBTRAPS)
{
library_reference = first parameter;
dispatch_table = LookupDispatch(libraryReference);
offset = trapNumber - sysLibTrapBase;
jump to dispatch_table[offset]
}
This pseudocode relies on:
1) all entry points to the library are enumerated in the dispatch table 2) all entry points take a library reference as the first parameter
To get CodeWarrior to call a library function through this system trap mechanism, our library wizard generates a header that defines all the entry points using the same syntax as used to define system calls. This syntax only works for top-level functions, not for class member functions.
Even if you could get a class member function to use this interface, you still have the problem that member functions expect the first parameter to be the hidden "this" pointer. However, the OS expects the first parameter to be the library reference. This conflict can't be easily resolved.
--
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/
