'Error in ./configure step. (CentOS 7) Your compiler does not have the necessary C++17 support
The lower part is as follows. How do we solve this?
checking whether the g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether C++ compiler accepts -std=c++17... no
checking whether C++ compiler accepts -std=c++20... no
configure: error: Your compiler does not have the necessary C++17 support! Cannot proceed.
Solution 1:[1]
I had the same issue and tried everything out. At the end i found the solution in this thread -> g++: error: unrecognized '-std=c++17' (what is g++ version and how to install)
yum install devtoolset-10-gcc-c++
scl enable devtoolset-10 bash
make
exit
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Endrit Demaj |
