error This file requires compiler and library support for the ISO C++ 2011 (cmake 升级3.29版本解决)

一、报错信息

        

/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: 错误:#error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

#error This file requires compiler and library support for the \

二、报错原因

        c++ 使用11互斥锁mutex

#include <mutex>

        cmake 使用c++11标准

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

三、问题分析

        问题原因是cmake 3.0版本以上才支持c++11标准

        升级cmake即可解决这个问题

四、升级cmake到3.29

    

cd cmake-3.29.3

 ./configure

make & make install

如果有如下报错

 CMake Error at Utilities/cmcurl/CMakeLists.txt:644 (message): Could not find OpenSSL. Install an OpenSSL development package or configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL

缺少openssl-devel库,安装继续

sudo yum install openssl-devel

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值