Thanks Jonathan. Just a follow up. "more strictly-confirming 4.4.5 compiler will complain about" Does 4.4.5 have a dependency(recommendation) on any particular version of libstdc++? If I had built 4.4.5 as a native compiler on my build machine to replace the old version; would it have updated my libstdc++ installed at /usr/lib? I am really having a lot of trouble understading the relationship between g++ and libstdc++. -----Original Message----- From: Jonathan Wakely [mailto:jwakely.gcc@xxxxxxxxx] Sent: Monday, January 10, 2011 4:23 PM To: Deol, Mandeep Cc: gcc-help Subject: Re: g++ and libstdc++ On 10 January 2011 20:50, Deol, Mandeep <mdeol@xxxxxx> wrote: > Hi All, > > I am working on a project to switch our gcc compiler from version 3.4.6 to 4.4.5. Our current build machines have 3.4.6 as the default c++ compiler and we installed 4.4.5 at a different location (/apps/gcc/......). The new installation of 4.4.5 comes with its own set of c++ headers and libstdc++, thus when I try to run the app built with the newer version of the compiler it does not run. I know one way to get this to work is to update libstdc++ on the system or set LD_LIBRARY_PATH to use the newer libs. You can also set an RPATH in the app, using -Wl,-rpath,/apps/gcc/...../lib (or .../lib64) so the runtime linker knows where to find the libraries without needing LD_LIBRARY_PATH. > I am wondering if it is some how possible to get 4.4.5 to use the old headers and libstdc++? Probably not. I can't think of any offhand, but there are probably some bugs in the old libstdc++ headers which were not diagnosed by GCC 3.4.5, but which the newer, more strictly-confirming 4.4.5 compiler will complain about. You could try it though, by using -I/apps/gcc/.../include and -L/apps/gcc/..../lib You might need to specify other directories for platform-specific headers and libraries, use -v to see the default include and library paths. You might also be able to make use of -nostdinc++