On 19 April 2011 08:43, Qi Zuo wrote: > > May I ask how did you configure the compiler and library path after > you compiled GCC4.6.0? You configure the compiler *before* you build it, not after. > My problem seems to be something wrong with the > LD_LIBRARY_PATH. > Initially the compiled GCC can't find the MPC it uses. So the path of > mpc library must be set. I used LD_LIBRARY_PATH Yes, if you install gmp, mpfr and mpc without using --disable-shared then gcc depends on the shared libraries at runtime. See http://advogato.org/person/redi/diary/240.html (and the pages it links to) for a simple way to build gcc so you don't need to set LD_LIBRARY_PATH to use it. > -bash-3.00$ export LD_LIBRARY_PATH=/lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib > -bash-3.00$ echo $LD_LIBRARY_PATH > /lab/home/zuoqi/gcc32/gcc-gnu-ccs/lib > > Then, when I compile the hello.cpp program, I got unreferenced > std::cout problem. Those symbols should be defined in libstdc++, maybe there's a symbol versioning problem.