Re: libtsdc++ and AIX linker problem

From: Paul Pluzhnikov (ppluzhnikov-nsp_at_charter.net)
Date: 03/27/05


Date: Sun, 27 Mar 2005 08:00:32 -0800

kkivi@fromru.com writes:

> can anybody explain what is wrong with libstdc++ on AIX.

Nothing.

> [src@grs1 src]$ g++ -Wl,-brtl a.cc -o aa -lstdc++

You should not add '-lstdc++' to the link line at all:
g++ will do it correctly all by itself.

What happens if you remove '-lstdc++' from the link line?

> [src@grs1 src]$ g++ -v
> Reading specs from
> /usr/local/gcc342/lib/gcc/powerpc-ibm-aix5.3.0.0/3.4.2/specs

What could be happening is that your link somehow picks up libstdc++
from gcc-2.95 instead of the one from gcc-3.4.2.

You may wish to add -Wl,-bnoquiet flag to the link and verify
that the linker finds libstdc++ where it is supposed to (under
/usr/local/gcc342/lib/).

Cheers,

-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


Relevant Pages

  • Re: Getting rid of libstdc++?
    ... > regarding compatibility. ... because none of its external dependencies will be satisfied (the ... object layout has changed between his version of libstdc++ and yours, ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)
  • Re: libstdc++ problem
    ... What stops you from also copying libstdc++.sl while you are at it? ... what stops you from linking that exe with libstdc++? ... - it's a violation of the GPL, ... In order to understand recursion you must first understand recursion. ...
    (comp.sys.hp.hpux)
  • Re: Non-PIC libstdc++ under Linux x86_64
    ... > seems libstdc++ has not been compiled with PIC option under this platform. ... > What I want is to have a shared object which is independent of the ... > Maybe someone knows some good documents describing this? ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)