你如何在eclipse中将C ++ 11设置为默认值?

时间:2016-09-05 23:09:03

标签: eclipse eclipse-cdt

是否可以避免必须转到项目设置并添加编译标志,以便为我在eclipse中创建的每个项目使用C ++ 11,只是将C ++ 11作为默认设置?

1 个答案:

答案 0 :(得分:1)

您可以将其设为指定工作区的默认设置,方法是转到Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT [Your Compiler] Built-in Compiler Settings,然后将-std=c++11添加到Command to get compiler specs

请注意,为了让项目选择此工作区范围的设置,在项目的Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Providers -> CDT [Your Compiler] Built-in Compiler Settings中,需要检查Use global provider shared between projects