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

Source: Internet
Author: User

g++ Installation

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

Currently the LTS version of Ubuntu is 14.04, directly in the apt-get command installation of g++ to not 5.0 version, can not get all the c++14 support, so you must install more than 5.0 version of g++, here the method is as follows:

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 Information

Eclipse CDT Installation

To the Eclipse Open source project website to download a new version of the CDT development environment, you need to install the Java operating environment, a search on the internet is, slightly.

Eclipse CDT Internal configuration and engineering configuration

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

Before you set up the project, configure ECLIPSE Syntax parser:
Specific 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 the Project open property:

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

Re-compiling
Rebuild index: Project->c/c++ Index
Restart Eclipse.

Start the C++14 Tour

Start making the code.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

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

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.