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
  • 相关阅读:
    POJ 3177 Redundant Paths(无向图缩点)
    POJ 1502 MPI Maelstrom
    LightOJ 1094
    POJ 1564 Sum It Up(深搜)
    C语言复习6_doWhile循环
    进阶学习
    C语言复习5_调试
    C语言复习4_while循环
    C语言复习3_条件结构
    C语言复习2_运算符
  • 原文地址:https://www.cnblogs.com/solohac/p/4154145.html
Copyright © 2011-2022 走看看