如何向 Code::Blocks 编译器添加 C++11 支持? [英] How can I add C++11 support to Code::Blocks compiler?

查看:48
本文介绍了如何向 Code::Blocks 编译器添加 C++11 支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一些代码,需要对我的 Code::Blocks 12.11 提供 C++11 支持.我正在使用 MingW 附带的默认 GNU GCC 编译器.有什么办法可以做到这一点吗?

I'm writing some code that requires to have C++11 support for my Code::Blocks 12.11. I am using default GNU GCC Compiler came with MingW. Is there any way I can do this?

推荐答案

  1. 转到<代码>工具栏 ->设置 ->编译器
  2. Selected compiler下拉菜单中,确保选择GNU GCC Compiler
  3. 在其下方,选择 compiler settings 选项卡,然后选择下方的 compiler flags 选项卡
  4. 在下面的列表中,确保选中让 g++ 遵循 C++11 ISO C++ 语言标准 [-std=c++11]"框
  5. 点击OK保存
  1. Go to Toolbar -> Settings -> Compiler
  2. In the Selected compiler drop-down menu, make sure GNU GCC Compiler is selected
  3. Below that, select the compiler settings tab and then the compiler flags tab underneath
  4. In the list below, make sure the box for "Have g++ follow the C++11 ISO C++ language standard [-std=c++11]" is checked
  5. Click OK to save

这篇关于如何向 Code::Blocks 编译器添加 C++11 支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆