C++14 Series (1): Linux under C++14 development environment configuration

Source: Internet
Author: User

g++ Installation

Address:
http://sysads.co.uk/2014/07/install-gcc-gnu-4-9-1-on-ubuntu-14-04/

The current Ubuntu lts version number is 14.04, directly installed in the Apt-get command g++ to the 5.0 version number, not all c++14 support. Therefore, you must install the g++ of version 5.0 or above. Here are the methods such as the following:

sudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get updatesudo apt-get install g++-5

–remove the previous g++ version from the default Applications list (if already exists)

sudo update-alternatives --remove-all gcc

–make g++ 5 The default compiler on the system

sudo update-alternatives–install/usr/bin/g++ g++/usr/bin/g++-5 20

sudo update-alternatives–config g++

Use

g++ --version

View g++ version number information

Eclipse CDT Installation

To download the new CDT development environment at the Eclipse Open Source project site, you need to install the Java execution Environment first. A search on the internet is all. Slightly.

Eclipse CDT Internal configuration and project configuration

References:
Http://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support

Before you build project, configure ECLIPSE Syntax parser:
Detailed steps:
CDT GCC build-in Compiler Settings, Discovery, Settings, Preferences, C + +, Window

In Command to get compiler specs plus-std=c++14

Create a new c++project:

For project created C/C + + project, project, New, As:file

Right-click Project Open Properties:

Properties-Settings, C + + Build, Tool Settings, GCC C + + Compiler, dialect

Plus-std=c++14 to other dialect flags

In addition, in order to parse and index the new version of some syntax:
Preprocessor Include Paths, Marcos etc. Providers

Enable CDT GCC build-in Compiler Settings and move it higher then contributed pathentry Containers (important)

At last

Compile once again
Build index again: Project->c/c++ Index
Restart Eclipse.

Start C++14 Tour

Start making code.

C++14 Series (1): Linux under C++14 development environment configuration

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.