您当前的位置: 首页 >  c++

RuiH.AI

暂无认证

  • 0浏览

    0关注

    274博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C++ std报错:error: ‘index_sequence‘ is not a member of ‘std‘

RuiH.AI 发布时间:2022-01-04 14:42:33 ,浏览量:0

C++ std报错:error: 'index_sequence' is not a member of 'std'

错误日志1 SLAM十四讲中,编译带g2o库的文件时,报:

error: 'index_sequence' is not a member of 'std'

解决方法 十四讲编译采用C++ 11,而最新的g2o库采用了C++ 14的特性。因此,解决方法很简单,在CMakeLists.txt里添加:

set(CMAKE_CXX_STANDARD 14)

就解决了

错误日志2 编译时报找不到Sophus依赖的头文件:

fatal error: fmt/core.h No such file or directory

解决方法 首先确保安装了fmt这个库:

sudo apt install libfmt*

然后在CMakeLists中的链接库中添加:

target_link_libraries(file Sophus::Sophus)

问题解决。

关注
打赏
1658651101
查看更多评论
立即登录/注册

微信扫码登录

0.2537s