Subject: Re: Shared lib init and C++ constructors
To: None <crvich@us.ibm.com>
From: Dave Huang <khym@bga.com>
List: port-i386
Date: 12/22/1999 18:53:53
On Wed, 22 Dec 1999 crvich@us.ibm.com wrote:
> Has anyone here successfully created a shared library from C++ source
> which contains static class variables? For me, constructors of static
> class variables aren't called when the library loads. Initialization of
> other static data occurs normally. Any ideas what might be causing this
> problem?
When creating the shared library, try adding /usr/lib/c++rt0.o to the
list of objects that are linked together (I don't know if the order
matters, but I always put it first). This works for me in 1.4.x; I
don't know about 1.3.x...
--
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@bga.com | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 24 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++