Reputation: 488
I received an error while trying to build CMake on Linux. I could not reach the make
step. I read around the web but still couldn't really fix this.
I tried both of these, but neither worked:
$ ./configure --prefix=/opt/cmake
$ ./bootstrap
They resulted in:
CMake Error at CmakeLists.txt:107 (message):
The C++ compiler does not support C++11 (e.g. std::unique_ptr).
-- Configuring incomplete, errors occurred
--------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
--------------------------------------------
And:
command -v g++
/usr/bin/g++
g++ --version
g++ (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 7.4.0
The code I am trying to compile is in C, so I'm wondering why I'm receiving errors raised with respect to the C++ Compiler? Perhaps any thoughts on this too?
Upvotes: 6
Views: 14381
Reputation: 87
You can set up the specific gcc and g++ version using the following commands.
export CC=path_of_gcc/gcc-version
export CXX=path_of_g++/g++-version
And now run any of the commands:
./configure #OR
./bootstrap
Upvotes: 3