/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: 错误:#error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
_ooci.cpp:683:23: 错误:‘nullptr’在此作用域中尚未声明
int len=vsnprintf(nullptr,0,fmt,ap);
开个帖记录一下,原因是gcc编译器版本太低。
通过以下命令提升gcc版本
# yum install -y gmp-devel mpfr-devel libmpc-devel gcc gcc-c++ gcc-gfortran.x86_64 make
# tar -Jxvf gcc-9.5.0.tar.xz
# cd gcc-9.5.0/
# ./configure --prefix=/usr --disable-multilib --enable-languages=c,c++,fortran
# make -j 8
# yum remove gcc -y
# make install
# gcc -v
安装包下载地址Index of /gnu/gcc/gcc-9.5.0