Thread View: gnu.g++.help
1 messages
1 total messages
Started by Andreas Zeller
Thu, 17 Dec 1992 21:34
How can I build a sharable g++ library?
Author: Andreas Zeller
Date: Thu, 17 Dec 1992 21:34
Date: Thu, 17 Dec 1992 21:34
34 lines
1823 bytes
1823 bytes
Hi all,
I'm looking for a way to build a sharable library
using g++ 2.3.2 under SunOS 4.1.1.
The "vanilla" approach (say, g++ -nostdlib -o libstuff.so.1.0 *.o)
does not work, since when I'm linking (using g++ main.o -lstuff),
constructors/destructors of static objects in the sharable library
are not included in the global constructor/destructor list and
thus not invoked upon execution.
There is some code related to this in the 2.0 distribution
of libg++ (drt0.c, init.c, init_main.c, dynamic_lib.c, dldefs.h),
written by James Kempf (of SUN?), but despite all trials,
I can't figure out how to use it correctly.
It seems I have to build a special object, drt0.o
(using gcc -c drt0.c or cc -pic -c drt0.c), which manages all
the constructor/destructor stuff, and have it included in
my shared library. This is what I do. But all I get is
an "illegal instruction" error.
So, if any of you outside there have managed to build a
sharable library using g++, please let me know.
Any hint is appreciated.
Please e-mail. I will summarize your suggestions.
(Andreas Zeller)
--
__o Andreas Zeller
_`\<,_ TU Braunschweig, AG Softwaretechnologie
( )/ ( ) Gaussstrasse 17 Tel: +49 531/391-7580 zeller@ips.cs.tu-bs.de
--^----^-- D-3300 Braunschweig Fax: +49 531/391-8111
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads