g++ error on Solaris/Sparc undefined reference to std::cout

Ian Lance Taylor iant@google.com
Tue Apr 19 13:51:00 GMT 2011


Qi Zuo <bitsunnyday@gmail.com> writes:

> Following your instruction, I checked the libstdc++.so. But I don't
> know whether I've done the right check.

It looks right.  This is a strange problem.

You said that you are using GNU ld.  Try compiling hello.cpp with
-Wl,-t.  That will show you the exact libstdc++ which the linker is
opening.

Ian



More information about the Gcc-help mailing list