Thanks Ken, a collegue also spotted this problem and I have the code resource
working in my shared library.
It's good to hear that Metrowerks is working on Multi-segment shared libraries.
I hope they fix the problem
with supporting globals as well. It would also be nice if the linker had the
option of optimizing the order of the
objects to limit the number of fixups required for jumps > 32k.
Ken Krugler <[EMAIL PROTECTED]> on 01/10/2000 12:21:23 AM
To: Rob Dugal/Certicom@Certicom
cc: [EMAIL PROTECTED]
Subject: Re: how to have multiple code resources in a shared library?
At 12:00am -0700 00-09-30, Palm Developer Forum digest wrote:
>Well it appears as if this won't work. I get a failure when the shared library
>tries to load the code resource using DmGet1Resource('plug', 1000).
Sorry, I forgot to mention that you need to explicitly open up the
shared library DB, since it's not normally opened when the library is
running. You can stash the DB information when your shared library
gets loaded (your routine is called to return the ptr to the dispatch
table).
>The concept works if I'm loading another code resource in an
>application but not
>in a shared library. I am including the plugin code resource
>"PluginCode.rsrc" in the shared library project but it appears that the code
>resource is not placed in the SharedLib.prc by the linker.
Take a look at the PRC with any hex file editor...you should see the
'plug' resource type in the resource entry list following the header.
If not, then you've got a second problem, otherwise I think it's just
the issue of the shared lib resource DB not being opened.
>I also tried using a similar design but placing the code from the PlugIn in a
>2nd segment in the shared library but the linker prints an error that a code
>resource cannot have more than one segment when I try to build the shared
>library.
I'm currently working on a way to get Metrowerks to support a
multi-segment shared library...stay tuned.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/