在编译我的小程序的时候,触发了一个编译错误,程序中使用了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. Java基础——数据类型之间的转换

    Java数据类型分为三大类,即布尔型.字符型和数值型.其中数值型又分为整型和浮点型.Java的基本数据类型(8种)为布尔型boolean(1字节):字符型char(2字节):整型byte(1字节).s ...

  2. Ajax-(get/post/jQuery方式请求)

    < !DOCTYPE html > < html xmlns = "http://www.w3.org/1999/xhtml" > < head &g ...

  3. Nodejs笔记(二)

    Nodejs事件 Node.js 所有的异步I/O 操作在完成时都会发送一个事件到事件队列. Node.js里面的许多对象都会分发事件:一个net.Server对象会在每次有新连接时分发一个事件, 一 ...

  4. 一个不简单的Procedure body例子

    create or replace package body CountBankData_20150617 is type cursorCommon is ref cursor; --游标类型 str ...

  5. [前端 4] 使用Js实现图片上传预览

    导读:今天做图片上传预览,刚开始的做法是,先将图片上传到Nginx,然后重新加载页面才能看到这个图片.在这个过程中,用户一直都看不到自己上传的文件是什么样子.Ps:我发现我真的有强迫症了,都告诉我说不 ...

  6. Leetcode006 ZigZag Conversion

    /* simple simulation algorithm * we cann`t make sure the size of the string, * so it had better to s ...

  7. docker学习(一)

    atomic使用有点费劲,我改为centos7来做为学习环境. 1 安装 epel源就自带,目前版本是1.10.3 yum -y install docker docker version Clien ...

  8. .net HttpClient类(System.Net.Http) c#并发使用测试、压测

    .net HttpClient类(System.Net.Http) c#并发使用测试.压测

  9. Hadoop的shell脚本分析

    你会发现hadoop-daemon.sh用于启动单独的本机节点 而hadoop-daemons.sh 会批量的ssh到别的机器启动 前记: 这些天一直学习hadoop,学习中也遇到了许多的问题,主要是 ...

  10. 网站屏蔽指定ip

    修改.htaccess文件 Order Deny,Allow     //开启屏蔽Deny from 124.64.242.117  //要屏蔽的ip