reduce Ubuntu Central GCC and g++ version of
The gcc/g++ in Ubuntu 12.04 are all 4.6, dropping it to 4.4.
The procedure is as follows:
One, reduce the GCC version
1. $sudo Apt-get Install gcc-4.4
2, $sudo update-alternatives--INSTALL/USR/BIN/GCC gcc/usr/bin/gcc-4.4 40 (where "40" is the priority, the higher the value the higher the priority)
3, $sudo update-alternatives--INSTALL/USR/BIN/GCC gcc/usr/bin/gcc-4.6 60 (This machine comes with a set of 60 higher priority)
4, select the system default GCC
$sudo update-alternatives--config gcc
Selection |
Path |
priority |
Status |
* 0 |
/usr/bin/gcc-4.6 |
|
Auto mode |
1 |
/usr/bin/gcc-4.4 |
|
Manual mode |
2 |
/usr/bin/gcc-4.6 |
|
Manual mode |
The default system with the highest priority, here we choose 1.
Second, reduce the g++ version
1. $sudo Apt-get Install g++-4.4
2, $sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.4 40 (here "40" is the priority, the higher the value the higher the priority)
3, $sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.6 60 (This machine comes with a set of 60 higher priority)
4, select the system default g++
$sudo update-alternatives--config g++
Selection |
Path |
priority |
Status |
* 0 |
/usr/bin/g++-4.6 |
|
Auto mode |
1 |
/usr/bin/g++-4.4 |
|
Manual mode |
2 |
/usr/bin/g++-4.6 |
|
Manual mode |
The default system with the highest priority, here we choose 1.
Add: Switch with update-alternatives--config command if you want to change to a higher version at any time
In ubuntu12.04, the gcc4.6/g++4.6 version is reduced to gcc4.4/g++4.4.