`#include< iostream>`with`-std = c ++ 0x`断开 [英] `#include <iostream>` with `-std=c++0x` is broken

查看:158
本文介绍了`#include< iostream>`with`-std = c ++ 0x`断开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我指定 -std = c ++ 0x 到g ++,那么我不能 #include< iostream> 。我收到以下错误消息(在mingw下的g ++ 4.4.0):

If I specify -std=c++0x to g++, then I can't #include <iostream>. I get the following error messages (g++ 4.4.0 under mingw):

In file included from c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/postypes.h:42,
                 from c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/iosfwd:42,
                 from c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ios:39,
                 from c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ostream:40,
                 from c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/iostream:40,
                 from f.cpp:1:
c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error: '::swprintf' has not been declared
c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:166: error: '::vswprintf' has not been declared

任何想法为什么?这是否已经修复在最新的g ++? (如果是,是否有人知道如何将最新的g ++整合到Qt中)

Any ideas why? Has this been fixed in the latest g++? (And if so, does anybody know how to incorporate the latest g++ into Qt?)

推荐答案

它似乎是一个错误。有一个主题有一个简单的补丁(在最后)。

It seems to be a bug. There is a thread with a simple patch (in the very end).

这篇关于`#include&lt; iostream&gt;`with`-std = c ++ 0x`断开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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