在Tools > Options > C/C++ > Other中,没有C++17作为默认标准的选项。
如何编译需要C++17的代码?
发布于 2020-01-21 06:08:43
更新了NetBeans 12的3/28/21,如本答案末尾所述。
C++17标准是在NetBeans 8.2发布一年之后发布的,因此在标准版本8.2中,C++17是不可用的。
然而,NetBeans Bug Report Bug 271136 -支持C++17标准解决了这一缺陷,如果您下载并安装了2018年NetBeans 8.2的最新夜间版本,问题就解决了;在创建C++项目时,C++17可以作为一个选项:
如果选择{project} > Properties > Build > C++ Compiler,则可以验证是否使用了C++17标准:
备注:
更新日期: 1/21/20和1/22/20:
以下是使C++17在NetBeans 11.2上可用所需的步骤:
更新3/28/21 NetBeans版本12.x:
坏消息:officially不再支持C++了!见NetBeans小组组长Geertjan Welenga在对最近的NETBEANS-5501 C++17不再可用错误报告的答复中,日期为3/25/21
*At the moment, NetBeans doesn't support C/C++, the plugins you were/are using from 8.2 are not really officially supported, though work on this is ongoing here, with an end goal to having it officially part of NetBeans, though that will take a while:
https://lists.apache.org/thread.html/r4ac84633554ce80d99b0710e7a803ce1dc322680c914b18058876b51%40%3Cdev.netbeans.apache.org%3E
You're welcome to join in with the discussions on dev above.*
这就是说,有一个unofficial解决方案,详见bug report NETBEANS-4452插件安装程序发现加载C/C++远程开发API的超时问题。安装以下插件时: C++。这就是:
https://stackoverflow.com/questions/59828158
复制相似问题