如何更新代码:: blocks以使用TDM-GCC? [英] How can I update code::blocks to use TDM-GCC?

查看:99
本文介绍了如何更新代码:: blocks以使用TDM-GCC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在C ++作业中使用 unique_ptr

I need to use unique_ptr in my C++ assignment.

我下载了一个新的编译器TDM-GCC-4.7.1,并进行了安装。然后,我将GNU GCC编译器的目录更改为选项中的安装路径: Setting-> Compiler ...-> Toolchain Executable

I downloaded a new compiler, TDM-GCC-4.7.1, and installed it. Then I changed the directory of GNU GCC Compiler to the installation path in option: Setting->Compiler...->Toolchain Executable.

但是它不起作用。当我定义 unique_ptr 时。会发生错误:唯一指针不是'std'的命令

But it doesn't work. When I define a unique_ptr. A error would occur: "unique pointer is not a command of 'std' "

使用智能的原因指针将提供强大的异常安全性,这也是此分配的要求。我只需要使用C ++ 11的这个新功能...另外,我使用的操作系统是Window 7。

The reason of using smart pointer is to provide strong exception safety, which is also a requirement of this assignment. I just need to use this new feature of C++11... Plus, the OS I use is Window 7.

谢谢!

推荐答案


  1. 下载最新的tdm-gcc http://tdm-gcc.tdragon.net

  2. 设置->编译器,选定的编译器[GNU GCC编译器]复制并创建新配置[GNU GCC编译器4.9.2]

  3. 详细配置

  4. 单击设置为默认值
  5. ,将新的编译器配置设置为默认值更改编译器设置为具有c ++ 11
  1. Download the latest tdm-gcc http://tdm-gcc.tdragon.net
  2. Settings->Compiler, Selected Compiler [GNU GCC Compiler] Copy and Create a new configuration [GNU GCC Compiler 4.9.2]
  3. Detail configuration
  4. Set the new compiler configuration as default by click Set as default
  5. Change Compiler settings to having c++11.

PS:代码::版本13.12,tdm-gcc 4.9.2

PS: code::blocks ver 13.12, tdm-gcc 4.9.2

这篇关于如何更新代码:: blocks以使用TDM-GCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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