GNU GCC编译器更新 [英] GNU GCC compiler updating

查看:166
本文介绍了GNU GCC编译器更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用gnu gcc编译器的代码块。但是当我尝试编译一个范围基础的启动它给出许多错误。所以我认为编译器不支持C ++ 0x。所以我想知道如何知道我使用的编译器版本,以及如何正确地更新到C ++ 0x支持一个。

I'm using code blocks with gnu gcc compiler. But when I try to compile a range base for startment it gives many errors. So I think the compiler dosn't support C++0x. So I want to know how to know the compiler version I'm using and how to update it correctly to a C++0x supporting one. I'm using Windows XP.

推荐答案

此算法可能有助于从Windows上的C ++ 11开始编程:

This algorithm may help to start with programming with C++11 on Windows:

  • 1) Go to http://mingw.com and download the latest MinGW distribution, install it

2)下载CodeBlocks安装程序,安装它。在安装期间
它应该检测GCC安装并建议使用它作为默认
编译器,接受这个。

2) Download the CodeBlocks installer, install it. During installation it should detect GCC installation and propose to use it as default compiler, accept this.

3)开始一个新的CodeBlocks项目,转到
项目 - >属性 - >构建选项 - >编译器设置 - >
编译器标志,然后设置标志有g ++遵循即将到来的C ++ 0x ISO
C ++语言标准

3) Start a new CodeBlocks project, go to Project -> Properties -> Build options -> Compiler settings -> Compiler flags, then set flag "Have g++ follow the coming C++0x ISO C++ language standard"

4)编译您的第一个C ++ 11项目, b $ b fun!

4) Compile your first C++11 project and have fun!

顺便说一下,最新的MinGW g ++的版本是4.6.1,因此它必须支持大多数C ++ 11功能。

By the way, the latest MinGW g++ is of version 4.6.1 as for now, so it has to support most of C++11 features.

这篇关于GNU GCC编译器更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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