我是靠谱客的博主 动人钢笔,这篇文章主要介绍ROS 编译出错 error: ‘shared_ptr’ in namespace ‘std’ does not name a template type编译出错:解决方法:原因:参考:,现在分享给大家,希望可以做个参考。

编译出错:

/opt/ros/kinetic/include/moveit/macros/declare_ptr.h:52:16: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type

这里写图片描述

解决方法:

取消CMakeLists.txt下 add_compoile_options( -std=c++11 ) 的注释
这里写图片描述

原因:

ROS都是按照c++03的编译方法进行,如果使用了新标准c++11,则需要先这么处理一下,告知用c++11的方式进行编译。

参考:

https://blog.csdn.net/gyzgyz1989/article/details/53207192
https://answers.ros.org/question/216842/ros-using-c-11-how-to-use-with-catkin/

最后

以上就是动人钢笔最近收集整理的关于ROS 编译出错 error: ‘shared_ptr’ in namespace ‘std’ does not name a template type编译出错:解决方法:原因:参考:的全部内容,更多相关ROS内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(95)

评论列表共有 0 条评论

立即
投稿
返回
顶部