c++0x_warning.h:31:2: error
2014-05-06 15:24
302 查看
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
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
相关文章推荐
- CocoaPods 安装过程中的 Warning&Error 备忘
- CE6编译出错error C2220: warning treated as error - no 'object' file generated
- Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
- Warning: dns_get_record(): A temporary server error occurred
- WDK/DDK中掉 error C2220: warning treated as error - no ‘object’ file generated
- fdisk 的 WARNING: Re-reading the partition table failed with error 22: Invalid argument.
- Android Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
- android学习心得:error:Warning: Activity not started, its current task has been brought to the front
- Android Warning not all local changes may be shown due to an error
- xm:18:<module>:IOError: [Errno 13] Permission denied: '/var/run/xm-deprecation-long-warning'
- DDK “error C2220: warning treated as error - no object file generated”【转】
- Info:Memory module [DIMM] needs attention: Single-bit warning error rate exceeded, Single-bit fai...
- AS编译问题:Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
- 关于编译时的warning treated as error
- wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法
- WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
- Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
- Java HotSpot(TM) 64-Bit Server VM warning(error='Cannot allocate memory' (errno=12))
- warning和error的区别
- Ubuntu下关于Warning DBuserror.org.freedesktop.DBUS.Error.NoReply的解决方法