vmorph
vmorph

Reputation: 709

Eclipse CDT / cygwin: Use compiler command as default for all projects

Using Eclipse CDT, I would like to use the -std=c++11 command for the GCC C++ compiler as the standard argument across all projects.

How do I do that? I don't really like the prospect of adding this argument for every C++ project I create.

The g++ version is 4.8.2.2.

Upvotes: 1

Views: 87

Answers (1)

CoffeDeveloper
CoffeDeveloper

Reputation: 8325

The simplest and fastest way is to create a Template Project with all needed flags already setted (-std=c++11, but also -Wall -Wextra -O2 and everything you need.). You create it once and have it forever. It is a bit better than setting C++11 globally. Suppose one day you have to write C++03 code because your boss want C++03 (pretty common scenario for now), if you forget to remove the C++11 flag, then you will write code that potentially will compile on your machine but not on the machine of your boss.

Upvotes: 1

Related Questions