I'm using Ubuntu 14.. Currently my gcc compiler is v5.1.. But now I need to use Matlab mex, which so far only supports gcc-4.7.*. Is it possible to install the gcc-4.7 compiler without reinstalling gcc-5.1? What problems would be expected? Or is there any manual for running two gcc compilers on the same Ubuntu system?
Moreover, if installing and running two compilers can be done, will (totally) removing one affect the functionality of the other one?
I really don't want to remove the gcc-5.1 since it supports new C++ features/functions and my experience of installing a non-default gcc compiler was pretty unpleasant.