zoukankan      html  css  js  c++  java
  • libmemcached upcoming ISO C++ standard, C++0x

    在编译我的小程序的时候,触发了一个编译错误,程序中使用了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
  • 相关阅读:
    UML与ER图
    动态规划法求背包问题
    回溯法求解n皇后和迷宫问题
    优先队列和二叉堆
    快排,归并和Shell排序
    关系型数据库设计范式
    Python使用Redis数据库
    Python urllib简单使用
    当SQL UPDATE遇到EXISTS(SELECT ...)时
    关于使用mybatis的一个惨痛教训
  • 原文地址:https://www.cnblogs.com/solohac/p/4154145.html
Copyright © 2011-2022 走看看