我是靠谱客的博主 雪白蚂蚁,这篇文章主要介绍c++0x_warning.h 错误,现在分享给大家,希望可以做个参考。

g++编译使用libmemcached编写的程序时报错,做个简单的记录。

In file included from /usr/lib/gcc/x86_64-redhat-Linux/4.4.7/../../../../include/c++/4.4.7/cinttypes:35,

                 from /usr/include/libmemcached-1.0/memcached.h:46,

                 from /usr/include/libmemcached/memcached.h:39,

                 from main.cpp:4:

/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/C++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

 

解决方法:

         makefile之前的写法是: CXX = g++    

CXXFLAG = -g -Wall

在flag里加上-std=c++0x就可以编译通过啦,即:

CXX = g++

CXXFLAG = -g -Wall -std=c++0x

 

在.pro中添加

QMAKE_CXXFLAGS += -std=c++11

最后

以上就是雪白蚂蚁最近收集整理的关于c++0x_warning.h 错误的全部内容,更多相关c++0x_warning.h内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(157)

评论列表共有 0 条评论

立即
投稿
返回
顶部