Subject: Re: C++ Static Constructors and dlopen()'d Shared Libraries
To: Jay Painter <jpaint@real.com>
From: Dave Huang <khym@bga.com>
List: tech-toolchain
Date: 03/07/2000 18:38:15
On Tue, 7 Mar 2000, Jay Painter wrote:
> I'm having problems getting static (global) constructors and destructors
> to work when I dlopen() a C++ shared library on NetBSD 1.4.1 i386.

I haven't looked at your test program, but I've seen this problem
before... when creating your C++ shared library, try adding c++rt0.o to
the list of object files on the link line.

(Actually, I'm surprised that the static constructors worked for you
without c++rt0.o; neither the constructors nor destructors worked when I
tried).
-- 
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++