centos - ./configure 步骤中的错误。 (CentOS 7) 你的编译器没有必要的 C++17 支持

标签 centos g++ configure

下半部分如下。
我们如何解决这个问题?

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.

最佳答案

我有同样的问题,并尝试了一切。最后我在这个线程中找到了解决方案->
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

关于centos - ./configure 步骤中的错误。 (CentOS 7) 你的编译器没有必要的 C++17 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66964513/

相关文章:

ssh - FTP 脚本 - 将图像放在年份/日期文件夹中

linux - 在将带有 AWS 市场代码的 CentOS 根卷附加到其他 CentOS EC2 实例时,另一个实例使用附加的根卷启动

c++ - 不使用configure_file时如何使用CMake生成C++代码?

linux - 大目录和 cp 命令的问题

php - 无法将文件从 PHP 上传到 Centos 服务器?

c++ - 内存仍可访问的错误已修复,但为什么呢?

c++ - 在 mingw c++ 中获取链接错误

c++ - 在 G++ 4.8 中,typeof 仍然不能与 "::"一起使用

linux - 如何在 Redhat 7.0 中构建 gcc 4.2.0 以实现向后兼容?

ffmpeg - 在 Msys2 for Visual Studio 中使用 x264 编译 ffmpeg 的静态库,但从未找到 libx264