Hi,
    I've got two different versions of a static library that I licensed from
another company, and I'm trying to find a way to call into both of them from
a single Palm OS application. Directly linking both of them won't work,
since their function names are identical and I end up only linking
successfully to one or the other. I've also tried compiling each of them
into its own shared library (with some wrapper code for each function), but
for some reason this seems to make it impossible for them to access their
static data, so as soon as one of them tries to load its data files it ends
up calling DmFindDatabase with a null string for a filename; I've managed to
fix this by temporarily trap-patching a few of the database functions (so
that they would come up with the correct strings themselves), but that's
very hackish and won't work in OS5 anyway. I even went so far as to open up
one of the libraries in a hex editor and manually change the function names
(without altering the name lengths, of course), but the linker couldn't find
any of the newly-renamed functions when I tried to link it and the other,
unaltered library into the same project. And I can't just wrap each library
in an application file and work out something with SysAppLaunch, because the
libraries use their own globals.
    Does anyone know of any way that I can actually use these two libraries
at the same time without creating two different versions of my application?
Is there some way to get rid of that static data problem in my shared
libraries? Or is there a way I can successfully pull off the hex editing
trick? I'm using CodeWarrior now, but can switch to prc-tools if necessary
to make this work...

Many thanks,

Michael Love
Pleco Software



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to