I'm using the last version of Ubuntu which come with the gcc 4.4.5 version. I need to recompile a program that was not written by me and that can be only compiled with an older version of gcc like the 4.0. I managed to configure this older version and used a prefix during the install process so that my old gcc version is in the /opt/gcc-4.0.1/bin. I have tried to create a symlink using ln -s /opt/gcc-4.0.1/bin/gcc gcc
. But when I invoke gcc -v
I still get the result gcc version 4.4.5
. To compile my program which come already with a makefile, if I do make
, it's still using the new version of gcc. How could I tell make
to use the old version?
↧
How to use 2 different versions of GCC on Linux Ubuntu and force MAKE to use one of them
↧