GCC5.4 Installation

Source: Internet
Author: User

1. Download

Mirror site: https://gcc.gnu.org/mirrors.html

The speed is also good: ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/

2. Unzip the installation dependent library

./contrib/download_prerequisites

3. Configuration

./configure--disable-multilib (does not generate a cross-compiler compiled for executable code for other platforms)

4. Compiling the installation

Make && make install

5. Test code

#include <iostream> #include <string> #include <iterator> #include <algorithm> #include < array> int main () {    //Construction uses aggregate initialization    Std::array<int, 3> a1{{}};  Double-braces required    std::array<int, 3> a2 = {1, 2, 3};//except after =    std::array<std::string, 2& Gt A3 = {{std::string ("a"), "B"}};     Container operations is supported    Std::sort (A1.begin (), A1.end ());    Std::reverse_copy (A2.begin (), A2.end (),                       std::ostream_iterator<int> (Std::cout, ""));     Std::cout << ' \ n ';     Ranged for loop was supported for    (auto& s:a3)        std::cout << s << ';    Std::cout << ' \ n ';    }

 

If the following error occurs:

/usr/lib64/libstdc++.so.6:version ' glibcxx_3.4.21 ' not found (required by./test)

To update a soft connection:

/usr/lib64/libstdc++.so.6-/usr/lib64/libstdc++.so.6.0.21

GCC5.4 Installation

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.