chengyangkj / Ros_Qt5_Gui_App

ROS human computer interface based on Qt5(基于Qt5的ROS人机交互界面)
GNU General Public License v2.0
938 stars 306 forks source link

undefined reference to `cv::Mat::Mat(int, int, int) #22

Closed jianbuzhang closed 9 months ago

jianbuzhang commented 2 years ago

bug描述 when I run "catkin_make",it reported:undefined reference to `cv::Mat::Mat(int, int, int); 操作步骤 Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

分支名及平台:

jianbuzhang commented 2 years ago

CMakeFiles/cyrobot_monitor.dir/src/qnode.cpp.o: In function cyrobot_monitor::QNode::mapCallback(boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const>)': qnode.cpp:(.text+0x46e4): undefined reference tocv::Mat::Mat(int, int, int)' CMakeFiles/cyrobot_monitor.dir/src/qnode.cpp.o: In function cyrobot_monitor::QNode::RotaMap(cv::Mat const&)': qnode.cpp:(.text+0x75cc): undefined reference tocv::Mat::Mat()' qnode.cpp:(.text+0x7606): undefined reference to cv::Mat::create(cv::Size_<int>, int)' CMakeFiles/cyrobot_monitor.dir/src/qnode.cpp.o: In functioncyrobot_monitor::QNode::QImage2Mat(QImage&)': qnode.cpp:(.text+0x7ac7): undefined reference to cv::Mat::Mat()' CMakeFiles/cyrobot_monitor.dir/src/qnode.cpp.o: In functioncv::Mat::operator=(cv::Mat&&)': qnode.cpp:(.text.ZN2cv3MataSEOS0[ZN2cv3MataSEOS0]+0x2c): undefined reference to `cv::Mat::release()' collect2: error: ld returned 1 exit status

zhongguanLiu commented 1 year ago

请问你解决这个问题了吗?能否给出以下解决思路和步骤?

IricEmage commented 1 year ago

I have the same problem when I build with catkin_make. Have you already solved this?

_CMakeFiles/ros_qt5_gui_app.dir/src/qnode.cpp.o: In function ros_qt5_gui_app::QNode::QImage2Mat(QImage&)': qnode.cpp:(.text+0x777f): undefined reference tocv::Mat::Mat()' collect2: error: ld returned 1 exit status_

jianlaili commented 1 year ago

请问大佬有解决这个问题吗,我也遇到了