为了使用C17包括<filesystem>
我需要gcc-9包在我的centos码头。
默认情况下,centos:latest(aka 8)将从常规发行版repo安装gcc 8.3.1。
是否有任何PPA,测试存储库,无论什么,我可以很容易地安装一个gcc-9(或更高版本)包(即,不从源代码构建)
谢谢你!
注意:需要gcc-9才能有良好C17 <filesystem>
支持。
GCC 9发布说明:
现在,使用<filesystem>
中的类型和函数不需要与-lstdc++fs
链接。
源代码:https://gcc.gnu.org/gcc-9/changes.html
注2:CMake 3.16* 不支持任何cxx_filesystem编译器特性AFAIK。
参考:https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
注3:您可以在以下位置找到日志:https://github.com/Mizux/KalistoUnpacker/runs/642516660?check_suite_focus=true
1条答案
按热度按时间llew8vvj1#
只需使用
dnf
参考:https://centos.pkgs.org/8/centos-appstream-x86_64/gcc-toolset-9-gcc-9.1.1-2.4.el8.x86_64.rpm.html
注意:
source
在Dockerfile中不起作用,因此首选使用:或更好