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