Subject: Re: C++ q: constructors not called for classes in shared lib ?
To: Frank van der Linden <frank@wins.uva.nl>
From: Jaromir Dolecek <jdolecek@per4mance.cz>
List: current-users
Date: 02/02/1999 16:00:21
Frank van der Linden wrote:
> For NetBSD ports that use a.out, global constructors are not automagically
> initialized when using a shared library made out of C++ code. This
> is because the appropriate calls plus a .ini section that contains
> them are not present.

Well, it's not present because it's not possible or just because
nobody added them (the latter is quite unlikely, I guess) ?
If the former, why ?

>
> To make this work, you will need to include a .o file that takes care
> of this when creating the shared library. This is done for the
> "system" C++ shared libraries (i.e. libstdc++). The .o file in question
> is /usr/lib/c++rt0.o.

Is there any (semi-)automatic way how to find out if it's needed or not ?
It's not in any CXXFLAGS or something -- at least quick grep 
through /usr/shake/mk/* & /usr/pkgsrc/mk/* didn't reveal anything ...

-- 
Jaromir Dolecek <dolecek@ics.muni.cz>	http://www.ics.muni.cz/~dolecek/
-------------------------------------------------------------------------
It is better never to have been born.  But who among us has such luck?
One in a million, perhaps.