ubuntu调试CAN通讯
_M_T 2019-04-13 08:07:39 在ubuntu里调试CAN,用的pcan-pci卡,撞了驱动后,示例程序能跑通。现在想直接把示例程序移植到ROS下。自己写了个cmakeList文件。编译之后报这些错误。但是程序里已经包含rtdm.h头文件了。请问为什么还报这个错,怎么解决?几天了。不知道怎么办。
[ 87%] Linking CXX executable /home/mt/catkin_ws/devel/lib/can/transmittest
/home/mt/catkin_ws/devel/lib/liblibpcan.so:对‘rt_dev_ioctl’未定义的引用
/home/mt/catkin_ws/devel/lib/liblibpcan.so:对‘rt_dev_open’未定义的引用
/home/mt/catkin_ws/devel/lib/liblibpcan.so:对‘rt_dev_close’未定义的引用
collect2: error: ld returned 1 exit status
can/CMakeFiles/transmittest.dir/build.make:116: recipe for target '/home/mt/catkin_ws/devel/lib/can/transmittest' failed
make[2]: *** [/home/mt/catkin_ws/devel/lib/can/transmittest] Error 1
CMakeFiles/Makefile2:467: recipe for target 'can/CMakeFiles/transmittest.dir/all' failed
make[1]: *** [can/CMakeFiles/transmittest.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed