libstdc++ clashes with libC system library on Irix 6.5

Alexandre Oliva oliva@lsd.ic.unicamp.br
Tue Feb 1 20:23:00 GMT 2000


On Feb  1, 2000, Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de> wrote:

> Now I suppose the problem must be that libC in its global constructors
> does something bad to objects in libstdc++.

Yep.  You see, SGI's libC constructs `cout' in a way that is
incompatible with its layout in gcc.  So the crash...

This problem is not exclusive to Irix.  Whenever you try to link
the standard libraries of two separate C++ compilers together, you'll
get problems because of cin and cout.  That's very unfortunate, but
it's caused by the fact that the C++ Standard doesn't specify an ABI,
just an API.

> Could those objects be `tucked away' by rebuilding gcc with
> flag_honor_std turned on by default?

That's possible.  At least cin and cout would be moved into the std
namespace.  But not all of libstdc++ is namespace std-enabled :-(

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them



More information about the Gcc mailing list