编译ORBSLAM2时报错
Ubuntu20.04 Noetic
执行了这句命令后,报错如下
[ 65%] Linking CXX executable ../Examples/Monocular/mono_euroc
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to `DBoW2::FORB::L'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to `DUtils::Random::RandomInt(int, int)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to `DUtils::Random::SeedRandOnce()'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to `DUtils::Random::SeedRandOnce(int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mono_euroc.dir/build.make:121:../Examples/Monocular/mono_euroc] 错误 1
make[1]: *** [CMakeFiles/Makefile2:88:CMakeFiles/mono_euroc.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2
我在网上搜到了跟这个报错长得像的,说是opencv版本问题,我按照教程修改了Cmakelists.txt的这个部分
find_package(OpenCV 4.2 QUIET)
if(NOT OpenCV_FOUND)
find_package(OpenCV 2.4.3 QUIET)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 2.4.3 not found.")
endif()
endif()
没有用
网上好像没看到多少人遇到这个报错,请问该怎么解决