Right-click on your project and select Build Configurations --> Manage... --> New...
Name: CERN (for example). Copy from “Default”, then OK/Apply
Project --> Properties --> C/C++ build -> [tab] Builder Settings
Select recently added configuration, in this case CERN.
Uncheck the checkbox Generate Makefile automatically if it isn't already.
Set build location to the build folder inside PD (for example: ${workspace_loc:/powerdevs/build}). You may also click on File system... to browse to your folder directly.
Right-click on your project and select Build Configurations --> Set active --> CERN (or your custom config name)
Run --> Run
. You should eventually get a plot similar to the one attached in the example description.
http://stackoverflow.com/questions/17687984/cant-find-the-tool-settings-in-eclipse-cdt
http://stackoverflow.com/questions/17457069/enabling-c11-in-eclipse-juno-kepler-luna-cdt
http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features
Right click on your project and click Properties
Navigate to C/C++ General and Preprocessor Include Paths, Macros etc.
Select the Providers tab
Add -std=c++11 to Command to get compiler specs :
Apply changes, the Index should be generated automatically.
${COMMAND} -E -P -v -dD "${INPUTS}" -std=c++11
C++11 support in Eclipse Neon
In this Eclipse version, the C++11 support configuration has changed a bit. Right click on your project and click Properties
Navigate to C/C++ General and Preprocessor Include Paths, Macros etc.
Select the Providers tab
Select the CDT GCC Built-in Compiler Settings item from the list
Uncheck "Use global provider..."
In Command to get compiler specs input, add -std=c++11
Apply changes, the Index should be generated automatically.
#include
#include
#include
using namespace std;
vector vs = {"first", "second", "third"};
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
for(auto x : vs)
{
cout << x << endl;
}
return 0;
}
-- MatiasAlejandroBonaventura - 2016-04-07 I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
png | Screenshot_from_2017-06-28_18-32-01.png | r1 | manage | 166.0 K | 2017-06-28 - 23:33 | UnknownUser | Built in compiler settings |
png | Screenshot_from_2017-06-28_18-33-16.png | r1 | manage | 150.7 K | 2017-06-28 - 23:34 | UnknownUser | Build configuration |
png | image.png | r1 | manage | 119.8 K | 2017-03-21 - 16:44 | UnknownUser | |
png | image1.png | r1 | manage | 105.0 K | 2017-03-21 - 16:44 | UnknownUser |