休息 - 无法在Redhat 7中编译

RestBed - Not able to compile in Redhat 7

本文关键字:编译 Redhat 休息      更新时间:2023-10-16

我们正在RHEL7中构建我们的C 应用程序,我们需要将Rested用作服务和客户。

但是,当尝试编译源代码时,我们在GCC上遇到了版本是<4.9。

redhat不支持GCC版本> 4.8.5。

那么,解决方案是什么?我们有一个与GCC 4.8.5的分支吗?

编辑:" configuration.cmake"具有以下代码行。

if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL GNU )
    if ( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.9 )
        message( FATAL_ERROR "nGCC version < 4.9nYour systems default compiler is GCC. This project makes use of c++11 features present only in versions of gcc >= 4.9. You can use a different compiler by re-running cmake with the command switch "-D CMAKE_CXX_COMPILER=<compiler>" " )
    else ( )
        set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-non-virtual-dtor" )
    endif ( )

所以,默认情况下,代码不会支持该版本。

休息需要一个支持C 11的编译器。