简体   繁体   English

如何在 Dev C++ IDE 中启用 C++11 或 C++14

[英]how to enable C++11 or C++14 in Dev C++ IDE

I'm trying to compile this on Dev C++ IDE, but it's showing this error :我正在尝试在 Dev C++ IDE 上编译它,但它显示了这个错误:

error This file requires compiler and library support for the

  ISO C-+ 2011 standard. This support is currently experi Ical, and it be emblem with the -stdest or -stdagno 11 compiler options

Form softwaretestinghelp Q #2) Does Dev C++ support C++11? Form softwaretestinghelp Q #2) Dev C++ 是否支持 C++11?

  • To do this, click on Tools in Dev-C++ IDE.为此,请单击 Dev-C++ IDE 中的工具
  • Next click on Compiler Options接下来单击编译器选项...
  • Under this click the “ Settings ” tab.在此下单击“设置”选项卡。
  • Inside the settings tab, we can see the “ Code generation ” tab.在设置选项卡中,我们可以看到“代码生成”选项卡。
  • Click on the “ Language Standard (-std) ” value and set it to “ ISOC++11 ” or “ GNUC++11 ” as per your requirement.单击“语言标准 (-std) ”值并根据您的要求将其设置为“ ISOC++11 ”或“ GNUC++11 ”。

The screenshot below will help in actually changing the option.下面的屏幕截图将有助于实际更改选项。 在此处输入图片说明

Follow these Steps in DevC++.在 DevC++ 中遵循这些步骤。

Got to Tools -> Compiler Options... -> Programs转到工具->编译器选项... ->程序

在此处输入图片说明 在此处输入图片说明

replace filed as selected in the image:替换图片中选定的文件:

   gcc.exe -std=c++11
   g++.exe -std=c++11

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM