This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Linking shared libraries on hpux 10.20 with gcc 2.92.1 fails !!
- To: Eric Ladner <clad at chevron dot com>
- Subject: Re: Linking shared libraries on hpux 10.20 with gcc 2.92.1 fails !!
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 10 Nov 1999 13:16:54 -0700
- cc: help-gcc at gnu dot org
- Reply-To: law at cygnus dot com
In message <3829CF78.77507FC5@chevron.com>you write:
> Try this instead:
>
> g++ -fpic -c a.C
> g++ -fpic -c b.C
> ld -b a.o b.o -o x.sl
>
> This works for me. I've had problems in the past with g(cc/++)'s
This is wrong. Your ctors and dtors in the shared library will not work.
The solution for this problem is in the FAQ. It's not hard. The entry
"why can't I build a shared library".
jeff