tum-vision / lsd_slam

LSD-SLAM
GNU General Public License v3.0
2.62k stars 1.23k forks source link

liblsdslam.so: undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)' #325

Open boonflies opened 6 years ago

boonflies commented 6 years ago

I am trying to build lsd_slam for ros kinetic in ubuntu 16.04, when i get the following error, home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::_OutputArray::_OutputArray(cv::Mat&)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::line(cv::Mat&, cv::Point, cv::Point, cv::Scalar_ const&, int, int, int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::getOptimalNewCameraMatrix(cv::_InputArray const&, cv::InputArray const&, cv::Size, double, cv::Size, cv::Rect, bool)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::waitKey(int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::namedWindow(cv::String const&, int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::destroyAllWindows()' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::resizeWindow(cv::String const&, int, int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::_OutputArray::_OutputArray(cv::Mat&)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::line(cv::Mat&, cv::Point, cv::Point, cv::Scalar_ const&, int, int, int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::getOptimalNewCameraMatrix(cv::_InputArray const&, cv::InputArray const&, cv::Size, double, cv::Size, cv::Rect, bool)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::waitKey(int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::namedWindow(cv::String const&, int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::destroyAllWindows()' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::resizeWindow(cv::String const&, int, int)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /home/dyana/catkin_make/devel/lib/liblsdslam.so: undefined reference tocv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::chartraits, std::allocator > const&, cv::Point, int, double, cv::Scalar_, int, int, bool)'

How to resolve this issue?

bespoke-code commented 6 years ago

@boonflies could you please check if you can use Kevin George's fork of LSD-SLAM for Ubuntu 16? From my knowledge, it's the best fork of LSD-SLAM specifically for use on Ubuntu 16 + ROS Kinetic. It saves a ton of time debugging!

I hope this helps! :)

aniketgadwe commented 5 years ago

@bespoke-code LSD-SLAM Kevin George's fork of LSD-SLAM for Ubuntu 16 works like a charm. Thanks

bespoke-code commented 5 years ago

You're welcome, @aniketgadwe! Happy coding :)