ld.so.1: ./a.out: fatal: libstdc++.so.4: open failed: No such file or directory
Jonathan Wakely
cow@compsoc.man.ac.uk
Fri Aug 30 09:23:00 GMT 2002
On Fri, Aug 30, 2002 at 11:44:07AM -0400, Ian.C.Stong@mail.sprint.com wrote:
> On solaris 2.8 I installed gcc 3.1. GCC works fine and g++ on a file
> doesn't give any errors. But trying to run the compiled program (a.out)
> gives the following error:
>
> ld.so.1: ./a.out: fatal: libstdc++.so.4: open failed: No such file or
> directory
Sounds like you need to set LD_LIBRARY_PATH so that ld finds the
libstdc++ shared library file. This isn't a libstdc++ problem, it's how ld
works.
> The libstdc++.so.4 file does exist as does ld.so.1 so not sure what the
> problem is or how to fix.
It exists, but ld doesn't know how to find it.
for bourne shell:
LD_LIBRARY_PATH=/path/to/shared/libs/; export LD_LIBRARY_PATH
for C shell (eurgh):
setenv LD_LIBRARY_PATH /path/to/shared/libs/
N.B the value of LD_LIBRARY_PATH should be the directory containing the
shared lib, not the path to the lib itself.
Hope that helps,
jon
--
This space left intentionally blank.
More information about the Libstdc++
mailing list