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: help-gcc at gnu dot org
- Subject: Re: Linking shared libraries on hpux 10.20 with gcc 2.92.1 fails !!
- From: Eric Ladner <clad at chevron dot com>
- Date: Wed, 10 Nov 1999 14:03:04 -0600
- Organization: Chevron Products Company
- References: <38183EF6.39D5007F@oi42.kwu.siemens.de> <80cg0h$a0l$1@nnrp1.deja.com>
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
-shared
flag on HP-UX. This makes the linker do it.
Eric
jd_wells@my-deja.com wrote:
> I am currently experiencing the exact same
> problem. Did you ever find out what the problem
> is?
>
> Any help would be appreciated...
> JD Wells
>
> In article
> <38183EF6.39D5007F@oi42.kwu.siemens.de>,
> "Dr. Armin Tschammer"
> <tscha00a@oi42.kwu.siemens.de> wrote:
> > Hi,
> > Now I succeded in compiling and installing the
> gcc 2.95.1 on a hpux
> > 10.20 box.
> > I would like to create shared libraries and I
> did the following:
> >
> > g++ -fpic -c a.C
> > g++ -fpic -c b.C
> > g++ -shared a.o b.o -o x.sl
> >
> > I got the following message:
> >
> > /usr/ccs/bin/ld: DP relative code in
> file /var/tmp/cc2TTYoc.o - shared
> > library must be position
> > independent. Use +z or +Z to recompile.
> > collect2: ld returned 1 exit status
> >
> > Any hints ??
> >
> > Thanks
> >
> > Armin
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
================================================================
Eric Ladner | HPUX Systems Admin, Oracle DBA
Pascagoula Refinery | Java Programmer, Perl scripter, C++
Chevron Products Company | programmer, etc., etc., etc.