"C++11" Preparation: GCC 4.9.0 compile and install

Source: Internet
Author: User
Tags gmp windows download

C++14 are all thick, now c++11? Yes, the learning initiative is too poor for me to review. Before looking at a few eyes, but no chance to apply to work, the company's environment is HP-UX, the current development environment is still old VS2008. So it has not been used, now intends to practice practiced hand.

VS2013 for some reason, each time the new project Click Finish will crash, installation uninstall a few rounds still. So abandon Windows platform, install virtual machine, Ubuntu 12.04 64, gcc 4.9.0.

First, GCC 4.9.0 installation

Due to the company's network reasons, the virtual machine is unable to access the Internet, so only Windows download source installation.

So this method is only dedicated to the same as I do not have the Internet of bitter force friends.

1.:

ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz

2. Copy the compressed package to Linux and unzip

TAR-ZXVF gcc-4.9. 0. tar.gz

3. Download the required dependencies for compilation

CD gcc-4.9. 0 . /contrib/download_prerequisites

However, because my Linux can not access the Internet, can only open download_prerequisites, respectively, manually download each installation package.

Download_prerequisites content in a script

Each installation package in the above script

ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2ftp://gcc.gnu.org/ PUB/GCC/INFRASTRUCTURE/GMP-2.3.2.TAR.BZ2ftp://gcc.gnu.org/pub/gcc/infrastructure/ Mpc-0.8.1.tar.gzftp://ftp: //

After the download is complete, copy all the packages to the gcc-4.9.0 directory, unzip them, and create a soft link

Tar xjf mpfr-2.4.2. Tar.bz2ln-SF mpfr-2.4.2Mpfrtar XJF GMP-2.3.2. TAR.BZ2 Ln-SF gmp-2.3.2Gmptar Xzf MPC-0.8.1. tar.gz Ln-SF mpc-0.8.1MPC Tar xjf ISL-0.12.2. Tar.bz2ln-SF isl-0.12.2ISL tar xzf cloog-0.18.1. TAR.GZLN-SF cloog-0.18.1Cloog

4. All ready to start installation

CD.. mkdir gcc-build-4.9. 0 cd gcc-build-4.9. 0 .. /gcc-4.9. 0/configure--enable-checking=release--enable-languages=c,c++--disable-multilib

5. Successful generation of Makefile

Make-j2 && make Install

Here need to wait for 1 hours, look at the machine performance, anyway, my virtual machine and so on for 1 hours, the installation process card out of Xiang.

6. Finish the call and check the GCC version

"C++11" Preparation: GCC 4.9.0 compile and install

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.