gcc-2.95.2 link error

Alexandre Oliva oliva@lsd.ic.unicamp.br
Tue Feb 8 16:36:00 GMT 2000


On Feb  8, 2000, Hany Morcos <hanymorcos@yahoo.com> wrote:

> If I try g++ -G it works fine, but the a.out
> hangs...

No surprise, -G will create a shared library, not an executable

> If I try gcc mp.cpp it works fine and the a.out
> doesn't hang....

> hla34-** NONE ** {69} : g++ mp.cpp
> Undefined                       first referenced
>  symbol                             in file
[...]

This means your libstdc++ is missing some symbols.  The difference
between linking with gcc and g++ is that g++ implicitly links
libstdc++ in.  Which assembler/linker are you using?
Run `g++ -v mp.cpp' to tell.

-- 
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-bugs mailing list