在编译我的小程序的时候,触发了一个编译错误,程序中使用了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. 未来十年的十三条思考(FW)

    支付宝在某种意义上延续了“双十一”的购物狂欢. 如果你关注微信朋友圈,你会发现支付宝最近以各种广告.方案植入方式推出强劲广告.而其中很重要的一个促销手段便是,从今年12月1日到12月15日,用户在一些 ...

  2. 详解Ossim 4.3控制台

    在Ossim 4.2以后的发行版中增加了控制台功能下面加以详细说明,当Ossim 启动之后,在控制台以root身份登录系统后会执行ossim-setup脚本,然后显示如下图1所示,了解这些功能,以及操 ...

  3. VC与JavaScript交互(三) --- CWebPage类调用javascript函数(给js函数传参,并取得返回值)

    ①需要一个别人写好的类CWebPage,将其对于的两个文件WebPage.h和WebPage.cpp添加到工程中. ②添加WebBrowser控件,在视图/对话框类的头文件中#include &quo ...

  4. MFC六大核心机制之一:MFC程序的初始化

    很多做软件开发的人都有一种对事情刨根问底的精神,例如我们一直在用的MFC,很方便,不用学太多原理性的知识就可以做出各种窗口程序,但喜欢钻研的朋友肯定想知道,到底微软帮我们做了些什么,让我们在它的框架下 ...

  5. WF4.0 Activities<第一篇>

    一.基元工具 1.Delay Delay用于延迟一段时间执行下面的流程.在WF中实例是单线程运行的,Delay并不是Thread.Sleep方法实现的. Delay有一个Duration属性,用于设置 ...

  6. Landsat8免费下载地址

    一.国外 Landsat8提供免费下载,在USGS上有两个网站,下面介绍的这个网站操作比较方便.这里大赞美国的USGS和NASA机构,不但提供免费下载的数据,而且下载网站制作和维护的非常便捷.废话少说 ...

  7. SQL Server T-SQL高级查询(转)

    高级查询在数据库中用得是最频繁的,也是应用最广泛的.   Ø 基本常用查询   --select select * from student; --all 查询所有 select all sex fr ...

  8. JS常用的设计模式(12)—— 迭代器模式

    迭代器模式提供一种方法顺序访问一个聚合对象中各个元素,而又不需要暴露该方法中的内部表示. js中我们经常会封装一个each函数用来实现迭代器. array的迭代器: forEach = functio ...

  9. 2_JavaScript日期格式化

          第二章 JavaScript 时间格式化 2.1 Ticks 转换为常规日期 2.2 常规日期格式化 <input type="button" value=&qu ...

  10. POJ C++程序设计 编程题#3 编程作业—运算符重载

    编程题 #3 来源: POJ (Coursera声明:在POJ上完成的习题将不会计入Coursera的最后成绩.) 注意: 总时间限制: 1000ms 内存限制: 65536kB 描述 写一个二维数组 ...