This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LD_LIBRARY_PATH needed for gcc-3.4.5 executable


Can anyone suggest a fix for this??


I am compiling a program with gcc-3.4.5 g++.
When I go to execute that program I get the following:

ld.so.1: ./prog1: fatal: libstdc++.so.6: open failed: No such file or directory

I can solve the issue by setting my LD_LIBRARY_PATH to the directory where
libstdc++.so.6 is located.

This program used to run with gcc-2.95.3 without resetting LD_LIBRARY_PATH.

Question I have,

Is there a way to compile my program so that there is no need to have the
libstdc++.so.6 at runtime? Can I create a prog1, that contains all symbols and
no need for this library when executing?

If so, what are the command options for doing that? I have read over the g++ and
ld documentation but can not seem to find the correct combination.

Thanks,
Dave






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]