关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
已采纳
ERROR:shared_ptr does not name a type
收起
- 写回答
- 好问题 0 提建议
- 关注问题
微信扫一扫点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
3条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
知常曰明 2015-07-02 12:54关注你的share_ptr没有定义,可能是因为你的C++版本有问题。
最好直接使用boost库里的share_ptr本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏举报
微信扫一扫点击复制链接分享
评论按下Enter换行,Ctrl+Enter发表内容
报告相同问题?
提交
- 2017-03-01 15:48jay463261929的博客 原因: 可能是因为你的C++版本有问题 解决方法: #include ...http://stackoverflow.com/questions/11853851/string-in-namespace-std-does-not-name-a-type?spm=5176.8246799.blogcont.5.nF
- 2021-06-30 00:01白色小靴的博客 将所有报错的位置的 shared_ptr 均更换为 boost::shared_ptr
- 2023-06-17 20:10泡沫o0的博客 在这种情况下,我们通常会说 “A weak_ptr points to an object but does not own it.”(一个weak_ptr指向一个对象,但并不拥有它。) 下表总结了 std::unique_ptr、std::shared_ptr 和 std::weak_ptr 的主要差异...
- 2023-04-13 09:45初夏の火烧云的博客 error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
- 2021-03-09 14:48墨理学AI的博客 make install 安装时编译代码遇到的错误: warning: non-static data member initializers only available with -...error: 'shared_ptr' in namespace 'std' does not name a type 解决方法: 这是因为要使用C+.
- 斗转星移3的博客 error : ‘shared_ptr’ in namespace ‘std’ does not name a template type memory.h是老的头文件。 memory是新的C++头文件。在名字空间std中。 旧的C++头文件名如<iostream.h>将会继续被支持,尽管...
- 2019-08-03 14:51lzxjxsy的博客 用G++编译项目的时候发生标题上的错误,原因是,这是c++ 11标准的。在给g++传递命令行的时候加上-std=c++0x就行了。 还需要在源码中#include 我的cmakelists里面要这样改: set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS...
- 2021-07-07 22:3321版小明Rain的博客 背景:前段时间使用实验室的小车进行SLAM与导航的实操时,编译hdl出现的问题,去年还没有出现过,版本更新...error: ‘shared_ptr’ in namespace ‘pcl’ does not name a template type typedef pcl::shared_ptr<
- 2019-11-30 22:53nature1949的博客 https://stackoverflow.com/questions/28914711/getting-error-shared-ptr-in-namespace-std-does-not-name-a-type 个人测试并没有解决我的问题,或者是操作难度太大,所以有一种办法: a.确定自己需要版本,...
- 吃龙虾一样能吃饱的博客 ROS是按照c++03的编译方法进行的,而shared_ptr是新标准c++11中的内容 解决方法: 在CMakeLists.txt文件中指定使用c++11来编译: add_compile_options(-std=c++11) Compile as C++11, supported in ROS Kinetic ...
- 2018-06-16 16:30mataiyuan的博客 我们在使用g++编译程序的时候,有时会遇到如标题所示的错误,常见于Linux系统下。出现这种问题的原因是c++ 11 在各种平台下的兼容问题。可以在CMakeLists中作出如下修改:[html] view plain copy cmake_minimum_...
- 2020-12-26 14:49wangchaoqi1985的博客 错误: ‘shared_ptr’ in namespace ‘std’ does not name a 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=...
- isnow4ever的博客 error: ‘shared_ptr’ in namespace ‘std’ does not name a type 今天在ROS-Kinetic版本中编译indigo版本编译通过的程序,出现了如下问题 /opt/ros/kinetic/include/moveit/macros/declare_ptr.h:...
- 2023-10-11 21:11hhhcbw的博客 智能指针shared_ptr简单介绍,参考书籍《The C++ Standard Library》
- Zaki_gd的博客 解决方法: 取消CMakeLists.txt下 add_compoile_options( -std=c++11 ) 的注释 ## Compile as C++11, supported in ROS Kinetic and newer # add_compile_options(-std=c++11) 原因: ROS都是按照c++03的编译方法...
- 没有解决我的问题, 去提问

