g++编译使用libmemcached编写的程序时报错,做个简单的记录。
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cinttypes:35,
from /usr/include/libmemcached-1.0/memcached.h:46,from /usr/include/libmemcached/memcached.h:39,
from main.cpp:4:
/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.
Some influential environment variables:
So you set them as an environment variable; configure determines LDFLAGS and CPPFLAGS by checking config files and the environment. You can set them like this ...
export CPPFLAGS='-I/home/foo/sw/include'
export LDFLAGS='-L/home/foo/sw/lib/'
./configure
or as a one-liner:
env CPPFLAGS='-I/home/foo/sw/include' LDFLAGS='-L/home/foo/sw/lib/' ./configure