鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    melodic安装Cartographer时编译报错

    已定时 已固定 已锁定 已移动 未解决
    综合问题
    cartographer melodic
    1
    1
    104
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 6
      ros小菜鸡
      最后由 编辑

      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:289:49: error: ISO C++ forbids declaration of ‘EXCLUSIVE_LOCKS_REQUIRED’ with no type [-fpermissive]
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:289:9: error: ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’ cannot be overloaded
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:281:9: error: with ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:290:71: error: expected ‘;’ at end of member declaration
      void SetTrajectoryState(int trajectory_id, TrajectoryState state) override
      ^~~~~~~~
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:34: error: ‘parent_’ has not been declared
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^~~~~~~
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:41: error: expected ‘,’ or ‘...’ before ‘->’ token
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^~
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:49: error: ISO C++ forbids declaration of ‘EXCLUSIVE_LOCKS_REQUIRED’ with no type [-fpermissive]
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:9: error: ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’ cannot be overloaded
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:281:9: error: with ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’
      EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
      ^~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d_test.cc:24:0:
      /home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h: In member function ‘virtual std::__cxx11::string cartographer::common::DummyFileResolver::GetFileContentOrDie(const string&)’:
      /home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h:42:3: error: control reaches end of non-void function [-Werror=return-type]
      }
      ^
      /home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h: In member function ‘virtual std::__cxx11::string cartographer::common::DummyFileResolver::GetFullPathOrDie(const string&)’:
      /home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h:46:3: error: control reaches end of non-void function [-Werror=return-type]
      }
      ^
      cc1plus: some warnings being treated as errors
      ninja: build stopped: subcommand failed.
      <== Failed to process package 'cartographer':
      Command '['ninja', '-j20', '-l20']' returned non-zero exit status 1

      Reproduce this error by running:
      ==> cd /home/fu/cartographer_ws/build_isolated/cartographer && ninja -j20 -l20

      一直在报这种语法错误,上面是部分报错信息,由于都是这种语法报错所以就截取部分报错信息。求大佬答疑解惑,这到底是什么问题?困扰我好几天了。

      1 条回复 最后回复 回复 引用 0
      • 第一个帖子
        最后一个帖子
      皖ICP备16016415号-7
      Powered by NodeBB | 鱼香ROS