在编译我的小程序的时候,触发了一个编译错误,程序中使用了libmemcached,错误如下:

1
2
3
4
5
6
7
8
9
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cinttypes:35,
                 from /usr/local/include/libmemcached-1.0/memcached.h:46,
                 from ../include/../include/libmemcached/memcached.h:39,
                 from ../memcachedtest/memcachedtest.cpp:8:
/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.
../memcachedtest/memcachedtest.cpp: In function int main(int, char**)’:
../memcachedtest/memcachedtest.cpp:15: warning: deprecated conversion from string constant to ‘char*’
../memcachedtest/memcachedtest.cpp:16: warning: deprecated conversion from string constant to ‘char*’
make: *** [../memcachedtest/memcachedtest.o] Error 1

解决方法:

在makefile中添加:

1
CFLAGS := -std=gnu++0x

libmemcached upcoming ISO C++ standard, C++0x的更多相关文章

  1. error C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard,set _CRT_NON_CONFORMING_SWPRINT

    在VS2013上运行一个简单程序时,出现了error C4996: 'swprintf': swprintf has been changed to conform with the ISO C st ...

  2. swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter.

    'swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character ...

  3. C++中正确使用PRId64 (转载)

    转自:http://blog.csdn.net/win_lin/article/details/7912693 例子参考高性能流媒体服务器SRS:https://github.com/winlinvi ...

  4. gcc4.9.1新特性

    C family Support for colorizing diagnostics emitted by GCC has been added. The -fdiagnostics-color=a ...

  5. GCC 4.9.0 公布,提升 C++11 和 C++14 特性

    from :http://www.oschina.net/news/51084/gcc-4-9-0 GCC 4.9.0 公布,此版本号是个主要版本号更新,包含了 GCC 4.8.x 系列和之前的 GC ...

  6. Standard C++ Programming: Virtual Functions and Inlining

    原文链接:http://www.drdobbs.com/cpp/standard-c-programming-virtual-functions/184403747 By Josée Lajoie a ...

  7. C语言的ANSI/ISO标准

    摘自:http://see.xidian.edu.cn/cpp/html/1658.html 从技术上讲有两种C语言标准,一种来自ANSI(American National Standard Ins ...

  8. ISO C Random Number Functions

    This section describes the random number functions that are part of the ISO C standard. To use these ...

  9. 【APUE】Chapter5 Standard I/O Library

    5.1 Introduction 这章介绍的standard I/O都是ISOC标准的.用这些standard I/O可以不用考虑一些buffer allocation.I/O optimal-siz ...

随机推荐

  1. iOS 国际化

    1.在APPproject的新建一个Localizable.strings File->new file--->Resource --->strings File 2.添加需要的语言 ...

  2. ssh注解basedao简单的实现

    @Repository public class BaseDao extends HibernateDaoSupport{ protected Class objectClass; protected ...

  3. 五、用户数据报传输(UDP)

    1.UDP常用的发送和接收函数 int recvfrom(int sockfd,void *buf,int len,unsigned int flags,struct sockaddr *from,i ...

  4. C# 最原始的tree 递归使用

    ; i < dr.Rows.Count; i++)             {                 )                 {                     n ...

  5. div模拟下拉框

    1.模拟下拉框.点击文本框在文本框下面显示一个层divList,点击divList以外的任何地方,关闭divList层 document.body.onclick = function (e) { e ...

  6. js实现文字截断

    先前用jq做了一个文字截断功能,但是不用jq的项目要实现此功能还要引如jq显得过于麻烦.这里写了一个js的文字截断功能.直接上代码. HTML(测试用的): <div>我是pox我是pox ...

  7. 分享一个jquery写的类似于百度的搜索框,(可动态配置,可单列或者table格式,可填充数据)

    需求:类似于百度的搜索框,可配置,可单列可table格式,可填充数据.页面可多次使用,简单,易用. 想法:使用jquery,css,ajax,前台调用,后台返回json数据. jquery代码: va ...

  8. [原]Django慢请求分析工具--dogslow

    当你的网站突然变慢了,你怎么办? 先看监控,查看系统的资源消耗,CPU?IO?磁盘? 然后看日志,查看第一个出现慢请求的接口是哪个? 然后看依赖的服务,是第三方服务还是DB瓶颈,还是redis变慢,还 ...

  9. 索尼MT27i Android2.3.7 线刷Android4.04

    Author:KillerLegend From:http://www.cnblogs.com/killerlegend/p/3733150.html Date:2014.5.16 工具:Window ...

  10. js控制文本框只能输入数字 及 常用字符对应ASCII码值

    方法一: <INPUT TYPE='text' NAME=text onkeypress="a()"><script language=javascript> ...