"Rohit Arul Raj" <rohitarulraj@xxxxxxxxx> writes: > I build a native C++ compiler - version 4.1.1. > I then tried to execute a simple hello world C++ program. > > when compiled with g++, > it gives me the following error: > > ./a.out: error while loading shared libraries: libstdc++.so.6: cannot > open shared object file: No such file or directory If you install libstdc++.so.6 in a non-standard location, you need to tell the dynamic linker where to find it. This can be done by setting the environment variable LD_LIBRARY_PATH to the directory where libstdc++.so.6 can be found. Or by using -Wl,-rpath,DIR when you link. Or, on a GNU/Linux system, by adding the directory to /etc/ld.so.conf and friends and running ldconfig. Ian