Help me solve this error: fatal: libstdc++.so.5: No such file or directory !!
James E Wilson
wilson@specifixinc.com
Tue Sep 14 01:50:00 GMT 2004
tran trung dung~ wrote:
> ld.so.1: a.out: fatal: libstdc++.so.5: open failed: No
> such file or directory
This is how shared libraries work. There are multiple ways to address this.
1) Use the configure option --disable-shared, so that you don't have to
worry about how shared libraries work.
2) Put the directory with the gcc libraries in the environment variable
LD_LIBRARY_PATH so that they will be found by the dynamic linker. This
environment variable name may change from OS to OS, and some have more
than one, e.g. one for 32-bit libraries and one for 64-bit libraries.
See the OS documentation. See also the linker (ld) and dynamic linker
(ld.so) documentation.
3) Modify the dynamic linker configuation files to include the gcc
library install directory on the search path. This is sometimes the
file /etc/ld.so.con and the program ldconfig. See the OS documentation.
4) Use the linker option -R or -rpath option to hard code the gcc
library install directory into the binaries, so they can be found at run
time. This assumes the directories will always be in the same place on
all machines where this program will be run.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list