I cc'd this to the gcc-help list because someone else there may either have a suggestion, or may have the same problem. yuki shimada <epsoft@xxxxxxxxxxxxxx> writes: > Dear person > I am Yuki Shimada. > Thank you for your helpping me. > I had tried > > 1) I can find "libstdc++.so.6" is in "/usr/local/lib/libstdc++.so.6" > for example, I can read following list. > libstdc++.so > libstdc++.so.6 > libstdc++.so.6.0.0 > > ( "find / -iname 'libstdc++.so.6' -print" takes very long time in my > cpu . > So I did not complete it . ) > > 2) # echo /usr/local/lib >> /etc/ld.so.conf > # ldconfig > ---> after that,in "/etc/ld.so.conf", command list are as followes. > > /usr/kerberos/lib > /usr/X11R6/lib > /usr/lib/sane > /usr/lib/qt-3.1/lib > /usr/local/lib > > > 3) in bash: I added some command like followings. Is this OK ? > > # .bash_profile > > # Get the aliases and functions > if [ -f ~/.bashrc ]; then > . ~/.bashrc > fi > > # User specific environment and startup programs > > PATH=$PATH:$HOME/bin > $export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH > BASH_ENV=$HOME/.bashrc > USERNAME="root" You don't need to do both LD_LIBRARY_PATH and ldconfig; only one or the other. LD_LIBRARY_PATH is per-user, ldconfig affects the whole machine. The cache updated by ldconfig is checked before LD_LIBRARY_PATH, however. > > export USERNAME BASH_ENV PATH > > 4) For about "csh", I have no knowledge about this. > Usually,I use "linux ". Must I set LD_LIBRARY_PATH in csh ? You only need to set LD_LIBRARY_PATH for the shell you use. If you only use bash, don't worry about csh. > 5) compilling and excuting result for my case; > > [root@localhost c++]# g++ hello.cc > [root@localhost c++]# ./a.out > ./a.out: /lib/libgcc_s.so.1: version `GCC_3.3' not found (required by > /usr/local/lib/libstdc++.so.6) > [root@localhost c++]# This is rather strange. I don't get this problem my fbsd or linux boxen. But I think the problem can be solved a same way: find libgcc_s.so.1, and then add the dir it is in to ldconfig. There are two caveats: you will have more than one libgcc_s.so.1 The one you want is probably in /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/lib or in /usr/local/lib . You can find out for sure it is the right one by using: $ nm /usr/local/lib/libgcc_s.so.1 | grep GCC_3.4 which should print something like: 00000000 A GCC_3.4 The second caveat is that the directory containing the libgcc_s.so.1 from gcc 3.4 *must* come first in both lists. So change your ld.so.conf to look like this: /usr/local/lib /lib /usr/lib /usr/kerberos/lib /usr/X11R6/lib /usr/lib/sane /usr/lib/qt-3.1/lib Finally run: # ldconfig If this doesn't work, try LD_PRELOAD (which is also explained in the ld.so man page.) like this: $ export LD_PRELOAD=/usr/local/lib/libgcc_s.so.1 > 6) totally, I can not excute ./a.out still now. > Must I install "GCC_3.3" ? GCC_3.3 is a symbol which libstdc++.so.6 requires. You could install gcc 3.3.3, but it wouldn't help; you still need to make ld.so find the *right* libgcc_s.so.1, and then, instead of having two, you'd have 3! So hold off on installing gcc 3.3.3 until you get 3.4 working. > 7)Please help me!.