Hey Andreas, > Hi, > > I have Ubuntu 9.04 with gcc installed (located in usr/bin/..). > Now I have installed GCC again at: > > home/andrea/Desktop/gcc-4.3.3 > > from the GNU website and I need to use this second version. > I assume that all I need to do is to change the PATH variable (sth like the > environmental variable in Windows), so that it points to the compiler I > need. > My attempts to change the path variable didn't work for the following > reasons: > > 1. I am not 100% if the path destination is correct (I used the above > mentioned path, maybe I need to extend it to some subfolder in gcc-4.3.3.? > ...but which one? there is no "bin" folder inside gcc-4.3.3) > Did you already compile gcc? It seems to me that you just downloaded the sources but not binaries ... To compile gcc, you should create a separate directory (like "build") which should not be a subdir of the gcc-4.3.3 source directory). Then - within the build directory - you should call <path_to_gcc_sources>/configure --prefix=<installation_path> <some other options which you could check with configure --help>. As a second step you call "make" and finally "make install". Before "make install" you could also call "make check" to run the test suite ... > 2. After exporting the path and checking with "echo $PATH" I get: > > /home/andrea/Desktop/gcc-4.3.3/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games > > so it looks fine, but checking with "which gcc", and "whereis gcc" returns > the location from the first compiler (usr/bin/gcc). > Running my programs also shows that I'm still using the gcc from Ubuntu. > > Is there a proper way how to change the path variable, so that I'm using the > desired gcc version? > Thank you for your replies! > > Andrea > > Hope that helps, Andre-Marcel