I wanted to compile C++11 code on CentOS 6, so I followed the instructions to install the devtoolset. Here I'm using devtoolset-6, which has the gcc version of 7.3.1. I'm trying to build a simple c++ code:
#include <cstdlib>
int main() {
return 0;
}
with command g++ -std=c++11 test.cc
. And it gives the following error:
/opt/rh/devtoolset-7/root/usr/include/c++/7/cstdlib:131:11: error: ‘::at_quick_exit’ has not been declared
using ::at_quick_exit;
^~~~~~~~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/cstdlib:154:11: error: ‘::quick_exit’ has not been declared
using ::quick_exit;
I'v tried devtoolset-2 to devtoolset-7, and they all have the same error.