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

    复制功能包后换个路径构建报错

    已定时 已固定 已锁定 已移动
    ROS2机器人开发:从入门到实践
    构建功能包 第七章
    1
    1
    774
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 1
      1979370353
      最后由 编辑

      第七章中将chapt6_ws中的src复制到chapt7_ws的src中运行colcon build报错,报错内容如下:
      CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
      The C compiler

      "/usr/bin/cc"
      

      is not able to compile a simple test program.

      It fails with the following output:

      Change Dir: /home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp
      
      Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_0708e/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_0708e.dir/build.make CMakeFiles/cmTC_0708e.dir/build
      gmake[1]: 进入目录“/home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp”
      Building C object CMakeFiles/cmTC_0708e.dir/testCCompiler.c.o
      /usr/bin/cc    -o CMakeFiles/cmTC_0708e.dir/testCCompiler.c.o -c /home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp/testCCompiler.c
      Linking C executable cmTC_0708e
      /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0708e.dir/link.txt --verbose=1
      /usr/bin/cc CMakeFiles/cmTC_0708e.dir/testCCompiler.c.o -o cmTC_0708e 
      /usr/bin/ld: 找不到 -lgcc: 没有那个文件或目录
      /usr/bin/ld: 找不到 -lgcc: 没有那个文件或目录
      collect2: error: ld returned 1 exit status
      gmake[1]: *** [CMakeFiles/cmTC_0708e.dir/build.make:99:cmTC_0708e] 错误 1
      gmake[1]: 离开目录“/home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp”
      gmake: *** [Makefile:127:cmTC_0708e/fast] 错误 2
      

      CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
      CMakeLists.txt:2 (project)

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