error: expected constructor, destructor, or type conversion before ‘(’ token PLUGINLIB_DECLARE_CLAS
编译错误:
/home/star/rikirobot/catkin_ws/src/depth_camera/depthimage_to_laserscan/src/DepthImageToLaserScanNodelet.cpp:60:24: error: expected constructor, destructor, or type conversion before ‘(’ tokenPLUGINLIB_DECLARE_CLASS(depthimage_to_laserscan, DepthImageToLaserScanNodelet, depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet);^
depth_camera/depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/build.make:62: recipe for target 'depth_camera/depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/src/DepthImageToLaserScanNodelet.cpp.o' failed
make[2]: *** [depth_camera/depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/src/DepthImageToLaserScanNodelet.cpp.o] Error 1
CMakeFiles/Makefile2:6307: recipe for target 'depth_camera/depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/all' failed
make[1]: *** [depth_camera/depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed
出现错误的原因是ubuntu18.04 ros melodic版本与ubuntu16.04 ros kinetic版本中,pluginlib库函数发生了变化。
解决方法:
未修改前的代码:
修改为:
PLUGINLIB_EXPORT_CLASS(depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet)
再次编译,即可成功
error: expected constructor, destructor, or type conversion before ‘(’ token PLUGINLIB_DECLARE_CLAS相关推荐
- error: expected constructor, destructor, or type conversion before '.' token
今天写代码是遇到这样一个问题error: expected constructor, destructor, or type conversion before '.' token:立马网上查,原来是 ...
- 笔记error: expected constructor, destructor, or type conversion before ‘.‘ token
error: expected constructor, destructor, or type conversion before '.' token 找了半天原因,原来是犯了基础知识不扎实的错误, ...
- Error:expected constructor ,destructor, or type conversion before ‘(‘ token
在全局声明了一个结构体,随即对其进行memset(),出现如题的报错信息. C++中,全局域只能声明.初始化变量: 不能用于赋值.运算.调用函数 错误代码: #include <studio.h ...
- 【错误】expected constructor, destructor, or type conversion before '.' token - 第八个游侠的日志 - 网易博客...
[错误]expected constructor, destructor, or type conversion before '.' token - 第八个游侠的日志 - 网易博客 [错误]expe ...
- C++编程 expected constructor, destructor, or type conversion before '(' token
这是一个编译错误,其含意是:在字符 '(' 之前,应该是一个构造函数.析构函数或是类型转换等标识.编译程序现在在'('之前缺少必要的标识符,故提示错误.给你一个例子: int *p; p = new ...
- error: expected constructor, destructor, or typ...
2019独角兽企业重金招聘Python工程师标准>>> error: expected constructor, destructor, or type conversion bef ...
- JSON parse error: No suitable constructor found for type
错误信息: 2019-02-19 09:17:58,678 [http-nio-8080-exec-1] WARN org.springframework.web.servlet.mvc.suppor ...
- Android Studio之Error:(158) Error: Expected resource of type id [ResourceType]
Android Studio在输出apk包时,在检查代码规范性方面相比Eclipse要严格得多,以下代码可在Eclipse编译通过, Android Studio控制台报错:Error:(158) E ...
- Runtime error: expected scalar type Float but found Double
错误:Runtime error: expected scalar type Float but found Double w_true=torch.tensor([2,-3.4]).T b_true ...
最新文章
- zabbix 监控tomcat实例
- 元宇宙的“42条共识”
- 后MATLAB时代的七种开源替代,一种堪称完美!
- import win32api 安装pip install pypiwin32
- java求数组的最小值_JAVA编程求数组最大值和最小值
- 为什么不应该使用(长期存在的)功能分支
- python怎么处理文字_python 处理给规范的文字
- 终于找到了满意的博客主题
- jsonobject json对象里面_「jsonobject」用JSONObject解析和处理json数据 - seo实验室
- 简单干净的C#方法设计案例:SFCUI.AjaxValue()之三
- 关于MySQL分表操作的研究
- ES6系列_2之新的声明方式
- RMI、RPC、SOAP通信技术介绍及比对
- 基于HTML/CSS/JS的动态元素周期表
- 一篇SCI论文最快多久能完成?
- 打印机的系统是linux吗,linux下打印机的配置和使用
- VMware提示【该虚拟机似乎正在使用中】的解决方案
- 【防骗】来电显示号码竟可任意修改
- Kahan summation
- MobileNet网络学习笔记