Closed chenguang3312 closed 9 months ago
CMakeFiles/robot_arm_ui.dir/src/CCtrlDashBoard.cpp.o: In function
CCtrlDashBoard::CCtrlDashBoard(QWidget*, CCtrlDashBoard::StyleType)': CCtrlDashBoard.cpp:(.text+0x4e): undefined reference to
vtable for CCtrlDashBoard' CCtrlDashBoard.cpp:(.text+0x5c): undefined reference to `vtable for CCtrlDashBoard' collect2: error: ld returned 1 exit statuscpp .h文件导入后会报这样错误,重新编译也解决不了。QT小白 不吝赐教
cmakelist添加如下两句: set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
可以对比我的cmakelist,里面的每一行都不可缺少
ok 解决了 感谢 还有个问题就算QT 订阅图像话题,qt处理图像有大约2s的延时,这个有办法改进么?
ok 解决了 感谢 还有个问题就算QT 订阅图像话题,qt处理图像有大约2s的延时,这个有办法改进么?
您好,请问您是怎么解决的呢?我也是遇到你说的这个问题,在cmakelist.txt添加up主说的那两行也没有效果,还是一样的报错
CMakeFiles/robot_arm_ui.dir/src/CCtrlDashBoard.cpp.o: In function
CCtrlDashBoard::CCtrlDashBoard(QWidget*, CCtrlDashBoard::StyleType)': CCtrlDashBoard.cpp:(.text+0x4e): undefined reference to
vtable for CCtrlDashBoard' CCtrlDashBoard.cpp:(.text+0x5c): undefined reference to `vtable for CCtrlDashBoard' collect2: error: ld returned 1 exit statuscpp .h文件导入后会报这样错误,重新编译也解决不了。QT小白 不吝赐教