recently, the GCC version of Linux has been updated to GCC 6.1.0 version, I checked the GCC version on my machine ....
-------------gcc 4.4.7 I go, this is too low, and we know that GCC 4.4.7 is not support c++11, my temper is more irritable, decisive to upgrade to GCC 6.1.0 version!
I started with the Yum Update gcc command, and the hateful thing was that the machine also put GCC 4.4. Version 7 back to me again, you said hateful and hated, so I found the resources of GCC, as follows:
URL: http://ftp.gnu.org/gnu/gcc/
I opened the gcc-6.1.0. The results are as follows:
The methods we download on the Linux machine are:
Http://wget http://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2
Then unzip, then install
In fact, the method is this:
haha, not installed children's shoes do not hurry up, to install support c++11 version of the GCC
TAR-JXVF GCC-6.1.0.TAR.BZ2CD gcc-6.1.0./contrib/download_prerequisitesmkdir BUILDCD Build: /configure-enable-checking=release-enable-languages=c,c++-disable-multilibmakemake Install
The approximate steps are as follows:
1. First unzip, then enter the file
2. Implementation . /contrib/download_prerequisites , do not ask why, in fact, it is to download some libraries to rely on, and to do the configuration work
3. Create a file to hold the compiled file into the file
4. Implementation .. /configure-enable-checking=release-enable-languages=c,c++-disable-multilib
5.make (MAKE-J4, this is multi-core system use, I use a virtual machine, so use make option)
6. The above process we all know is very long, this time better sleep first or write a few algorithm questions, and then come back to see
7. When the above steps are complete, see if there are any errors, Make Install
8. Last g++--version check version
Now that the installation is complete, we can use it to enjoy the joy of programming.
Update gcc version to GCC 6.1.0 under CentOS