error: variable templates only available with ‘-std=c++14’ or ‘-std=gnu++14’

error: variable templates only available with ‘-std=c++14’ or ‘-std=gnu++14’,第1张

1、报错

编译(catkin build) svo_pro_ws时,报错

/opt/ros/melodic/include/pcl_ros/point_cloud.h:303:27: error: variable templates only available with ‘-std=c++14’ or ‘-std=gnu++14’ [-Werror]
  303 |     constexpr static bool pcl_uses_boost = true;
2、问题根因

rpg_svo_pro_open - Github Plus

CMake的版本太低,gcc/g++版本不合适

需要 CMake 3.21.4gcc/g++ 7.5.0

3、解决方法
  1. upgraded CMake from 3.10 to 3.21.4
  2. 打开新终端,确认CMake版本: cmake --version
  3. 将gcc/g++切换到7.5.0的版本
  4. 删除svo_pro_ws中所有的中间文件(一定要),并在该新终端中重新编译:catkin build

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1353551.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-14
下一篇2022-06-14

发表评论

登录后才能评论

评论列表(0条)

    保存