Open shield218 opened 5 years ago
I occured the similiar question this day:
../lib/libstvo.so:对‘cv::ximgproc::createFastLineDetector(int, float, double, double, int, bool)’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/imagesStVO.dir/build.make:123: recipe for target 'imagesStVO' failed
make[2]: *** [imagesStVO] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/imagesStVO.dir/all' failed
make[1]: *** [CMakeFiles/imagesStVO.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
And I found the reason is that the opencv_contrib-3.4.0 haven't been rightly installed in my computer. I hope this message would be helpful.
encoutered an error when make, my OS version is ubuntu18.04 with kernel 4.18, opencv version is 3.3.1 with contrib, mrpt is the version recommended in this repo, eigen 3.3.4, boost 1.65.1, yaml 0.5.2, tried all major versions from gcc4.8 to gcc7, seems that error encountered during linking.
PS: I've already added the following 2 lines in src/stereoFrameHandler.cpp in order to solve the error "random_device undefined"
#include <iostream> using namespace std
my command(with gcc-7.4.0): make d=VS
error info:
[100%] Linking CXX executable imagesStVO ../lib/libstvo.so: undefined reference to
cv::ximgproc::createFastLineDetector(int, float, double, double, int, bool)' ../lib/libstvo.so: undefined reference tomrpt::utils::CConfigFile::CConfigFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' ../lib/libstvo.so: undefined reference to
mrpt::utils::CConfigFileBase::read_double(std::cxx11::basic_string<char, std::char_traitsmrpt::gui::CDisplayWindow3D::addTextMessage(double, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mrpt::utils::TColorf const&, unsigned long, mrpt::opengl::TOpenGLFont)' ../lib/libstvo.so: undefined reference to
mrpt::utils::CImage::loadFromFile(std::cxx11::basic_string<char, std::char_traitsmrpt::utils::CConfigFileBase::read_bool(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) const' ../lib/libstvo.so: undefined reference to
mrpt::opengl::COpenGLScene::createViewport(std::cxx11::basic_string<char, std::char_traits