This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Path to libstdc++
- From: Manfred Hollstein <manfred dot h at gmx dot net>
- To: "M. Lavasani" <lavasani at connect dot org dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 25 Mar 2002 14:16:46 +0100
- Subject: Re: Path to libstdc++
- References: <200203251245.g2PCjfB17156@quioch.connect.liv.ac.uk>
M. Lavasani wrote:
> Hi
>
>
> I 've compiled gcc-3.0.3 on HPUX version 11.00.
>
> When I use g++ compiler to compile a program it links the binary to
> "libstdc++". The problem is, it using the full path:
>
> /opt/mehdi/gcc11/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.3/../../../libstdc++.sl.3
>
> That means if I upgrade my compiler the binary will not work anymore unless
> I compile it with new version.
This was recommended with earlier versions of gcc anyway.
>
> This is rather sad problem. I compiled gcc for the second time with option:
>
> --disable-version-specific-runtime-libs
>
> and also set the :
>
> libsubdir = $(libdir)
>
> instead of :
>
> libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
>
> Now when I try to compile my test program again, At first I get :
>
> can not find -lstdc++
I suggested implementing the ``--disable-version-specific-runtime-libs´´
to achieve exactly the behaviour you're trying to get, ie. keep
several versions of the libs installed while switching the "standard"
version of the compiler. It worked perfectly for libg++ and libstdc++,
but nobody has ported it to work with libstdc++-v3 which is used
nowadays. Right now, I'd strongly discourage using the given flag.
If you want to keep different versions of the tools/libraries
installed, you should use different directories for the ``--prefix=´´
for each version.
>
> and then :
>
> as: warning 2: Unknown option "--traditional-format" ignored.
> as: "/var/tmp/ccRlO9Ra.s", line 22: error 1052: Directive name not recognized - NSUBSPA
>
I guess, you're using HP native tools; you should install GNU
binutils instead and indicate this when configuring GNU gcc using
--with-gnu-as=/path/to/GNU/as
>
> The library "-lstdc++" exists in :
>
> /opt/mehdi/gcc11/lib
>
> I tried to use the soultion in FAQ , but I dn't know where to add the above
> path for g++ to automatically find the path.
>
> Any solution please?
>
HTH, cheers.
l8er
manfred
> Thanks
>
> __Mehdi
>
>
>
--
Manfred Hollstein If you have any questions about GNU software:
Hindenburgstr. 13/1 <mailto:manfred.h@gmx.net>
75446 Wiernsheim, FRG <http://people.redhat.com/manfredh/>
GPG: <http://people.redhat.com/manfredh/manfred.h@gmx.net.asc>
GPG fingerprint: 2E92 1176 F71A 392D 6AF4 3BBD 3145 F36B 27BA A62D