problem after compiling with g++

Christoph Bugel chris@tti-telecom.com
Sun Sep 15 00:24:00 GMT 2002


On 1970-01-01, Stephen Schweizer wrote:

> ./a.out: error while loading shared libraries:
> libstdc++.so.5: cannot open shared object file: No
> such file or directory
> 
> I do, however, have this library since I just compiled
> gcc 3.2 from the source.  It is located in /usr/lib
> and /usr/local/lib.  Can someone tell me how to fix
> this?

Symptom: a.out needs some dll and claims that it can't find
it.  (try ldd a.out, *very* usefull command)

Solution:

Step 1:
Make sure the dll exists
(verify with the famous ls -l command :-)

Step 2:
Make sure your executable (a.out) is looking at the right
places. (By default often only /lib and /usr/lib are looked
for.) Either change your LD_LIBRARY_PATH, or edit
/etc/ld.so.conf (if you know what you're doing). For details
about both options see man ld.so

Hope this helps.
(It has nothing to do with GCC by the way.)



More information about the Libstdc++ mailing list