./configure步骤中出错,(CentOS 7)您的编译器没有必要的C++17支持

6jjcrrmo  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(94)

下半部分是这样的,我们怎么解决这个?

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.
vsaztqbk

vsaztqbk1#

我遇到了同样的问题,并尝试了所有的方法。最后,我在这个线程中找到了解决方案-〉g++: error: unrecognized '-std=c17' (what is g version and how to install)

yum install devtoolset-10-gcc-c++
scl enable devtoolset-10 bash
make
exit

相关问题