On 19 April 2011 13:09, Qi Zuo wrote: > > -bash-3.00$ /lab/home/zuoqi/gcc32/gcc-gnu-ccs/bin/g++ hello.cpp > /var/tmp//ccDqluzK.o: In function `main': > hello.cpp:(.text+0x20): undefined reference to `std::cout' > hello.cpp:(.text+0x24): undefined reference to `std::cout' > hello.cpp:(.text+0x48): undefined reference to > `std::basic_ostream<char, std::char_traits<char> >>::operator<<(std::basic_ostream<char, std::char_traits<char> >& > (*)(std::basic_ostream<char, std::char_traits<char> >&))' > collect2: ld returned 1 exit status > > the paths checked by -v as following > > -bash-3.00$ /lab/home/zuoqi/gcc32/gcc-gnu-ccs/bin/g++ hello.cpp -v > Using built-in specs. > COLLECT_GCC=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/bin/g++ > COLLECT_LTO_WRAPPER=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/libexec/gcc/sparc-sun-solaris2.10/4.6.0/lto-wrapper > Target: sparc-sun-solaris2.10 > Configured with: ../gcc-4.6.0/configure ABI=32 > --prefix=/lab/home/zuoqi/gcc32/gcc-gnu-ccs --with-gnu-as > --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld > --enable-languages=c,c++,java > --with-gmp-include=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/include > --with-gmp-lib=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib > --with-mpfr-include=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/include > --with-mpfr-lib=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib > --with-mpc-include=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/include > --with-mpc-lib=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib --without-ppl > --without-cloog --enable-plugin --enable-lto > Thread model: posix > gcc version 4.6.0 (GCC) ... > LIBRARY_PATH=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib/gcc/sparc-sun-solaris2.10/4.6.0/:/usr/ccs/lib/:/lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib/gcc/sparc-sun-solaris2.10/4.6.0/../../../:/lib/:/usr/lib/ I suggest you look in these paths to find libstdc++.so and then run 'nm' on it to see if it contains the missing symbols.