3

I have found from other answers that in my Eclipse Mars CDT I can setup C++11 dialect using:

Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Dialect -> ISO C++11 (from drop down list)

and C++11 syntax highlighting using:

Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Entries -> GNU C++ -> Add.. (for CDT User Setting Entries) -> Preprocessor Macro: __cplusplus=201103L

Questrion:
How to save those properties as default configuration so that when I create new C++ project I will have them already set?

lewiatan
  • 1,126
  • 2
  • 21
  • 37

1 Answers1

4

Create a Template

You can create your own template for the C/C++ New Project Wizard. Lots more information in Creating a new C++ Project in Eclipse CDT with the same settings as another project but here is some extras about C++.

For C++ Use C++ Hello World Template as a starting point. The key difference between the C++ and C template (other than the source) is the isCProject passed to the NewManagedProject process.

Use the Elevenator Plug-in

Primarily designed to make C++11 default, the Elevenator plug-in may resolve your issues. However my answer has a significant hole in that I don't know how to install it on its own as it comes with Cevelop

Community
  • 1
  • 1
Jonah Graham
  • 7,890
  • 23
  • 55
  • This is great. Have you come up with a solution to create a template that creates C++ project instead of C project? How to do that.. I specifically want to set C++ dialect and I cannot do this in C project... – lewiatan Jan 20 '16 at 21:08
  • updated answer with some more info to help you along the way. You can use my example I wrote for the other answer to start you off, but you will have to do some digging in your .cproject file to identify which settings you want to change. https://github.com/jonahkichwacoders/example_cdt_template/blob/master/com.example.cdt.templates/template/template.xml – Jonah Graham Jan 20 '16 at 21:20