【发布时间】:2018-03-28 19:17:20
【问题描述】:
我们正在 RHEL7 中构建 C++ 应用程序,我们需要将 RestBed 用作服务和客户端。
但是,当尝试编译源代码时,我们在 GCC 上收到错误,即版本为
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.9\nYour 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 ( )
所以,我猜代码默认不支持版本。
【问题讨论】:
-
嗯,这没有帮助,因为编译不支持这样的标志。我已经编辑并添加了检查版本的代码 sn-p。