Eclipse Mars - 为 C++ 项目设置默认设置(默认设置为 C++11)
Eclipse Mars - set default settings for C++ project (c++11 set by default)
我从其他答案中发现,在我的 Eclipse Mars 中 CDT 我可以使用以下方法设置 C++11 方言:
项目 -> 属性 -> C/C++ 构建 -> 设置 -> 工具设置 -> GCC C++ 编译器 -> 方言 -> ISO C++11(从下拉菜单列表)
和 C++11 语法高亮使用:
项目 -> 属性 -> C/C++ 常规 -> 预处理器包括路径、宏等 -> 条目 -> GNU C++ -> 添加..(对于 CDT 用户设置条目) -> 预处理器宏: __cplusplus=201103L
问题:
如何将这些属性保存为默认配置,以便在我创建新的 C++ 项目时将它们设置好?
创建模板
您可以为 C/C++ 新建项目向导创建自己的模板。 中有更多信息,但这里有一些关于 C++ 的额外信息。
对于 C++ 使用 C++ Hello World Template as a starting point. The key difference between the C++ and C template (other than the source) is the isCProject
传递给 NewManagedProject
进程。
使用电梯 Plug-in
主要设计用于使 C++11 默认,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
我从其他答案中发现,在我的 Eclipse Mars 中 CDT 我可以使用以下方法设置 C++11 方言:
项目 -> 属性 -> C/C++ 构建 -> 设置 -> 工具设置 -> GCC C++ 编译器 -> 方言 -> ISO C++11(从下拉菜单列表)
和 C++11 语法高亮使用:
项目 -> 属性 -> C/C++ 常规 -> 预处理器包括路径、宏等 -> 条目 -> GNU C++ -> 添加..(对于 CDT 用户设置条目) -> 预处理器宏: __cplusplus=201103L
问题:
如何将这些属性保存为默认配置,以便在我创建新的 C++ 项目时将它们设置好?
创建模板
您可以为 C/C++ 新建项目向导创建自己的模板。
对于 C++ 使用 C++ Hello World Template as a starting point. The key difference between the C++ and C template (other than the source) is the isCProject
传递给 NewManagedProject
进程。
使用电梯 Plug-in
主要设计用于使 C++11 默认,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