At 12:00am -0700 00-05-26, Palm Developer Forum digest wrote:
>Subject: Re: Create Libraries
>From: "Ben Combee" <[EMAIL PROTECTED]>
>Date: Thu, 25 May 2000 17:29:43 -0500
>X-Message-Number: 60
>
> > Great Info! Now, I know that shared libraries aren't allowed to have
> > static or global variables, but how does this otherwise limit my use of
> > c++ in a libary?
>
>C++ virtual function tables are global objects. The CW C++ exception
>handling mechanism relies on global data too. So, you cannot create any
>objects which use virtual functions or have code that throws or catches
>exceptions in a shared library.
A while ago I wrote some code to support A4-based globals in Palm
shared libraries. There are some limitations to this support - for
example, you can't have globals that requires run-time "fixup" to
initialize properly.
So I'm not sure if this would work, but you could build the
Metrowerks C++ support libraries using A4-globals, and see if that
would allow you to build a shared library that used virtual functions
and C++ exceptions.
As for exceptions, another option is to modify the Metrowerks code to
use the exception chain ptr that the Palm OS has for its home-rolled
exception support. As long as you don't mix and match the two types
of exceptions, that should work without requiring globals.
-- 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/