DefSLAM icon indicating copy to clipboard operation
DefSLAM copied to clipboard

undefined reference

Open rainleong opened this issue 3 years ago • 4 comments

Hello author, I have completed the compilation process, but there was a link failure problem during the final linking process.such as :CMakeFiles/DefSLAMGT.dir/Apps/stereo_groundtruth.cc.o:in function‘cvflann::anyimpl::big_any_policycv::String::static_delete(void**)’: stereo_groundtruth.cc:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv]+0x15):对‘cv::String::deallocate()’undefined reference. how can i solve it thanks

rainleong avatar May 28 '21 08:05 rainleong

Hi! It seems a problem with the library Opencv linking. Take a look if you have only one version of Opencv installed. With multiple versions, It usually fails. Best,

JoseLamarca avatar Jun 08 '21 07:06 JoseLamarca

Thanks for your answer, I have solved this problem because I have installed multiple versions of opencv, so adding a new opencv include path and lib path to the cmakelist file solved the problem. The changes are as follows: include_directories( ${OpenCV_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/Thirdparty/ORBSLAM_2/include/ ${PROJECT_SOURCE_DIR}/Thirdparty/BBS ${PROJECT_SOURCE_DIR}/Modules/Common ${PROJECT_SOURCE_DIR}/Modules/GroundTruth ${PROJECT_SOURCE_DIR}/Modules/Mapping ${PROJECT_SOURCE_DIR}/Modules/Matching ${PROJECT_SOURCE_DIR}/Modules/Settings ${PROJECT_SOURCE_DIR}/Modules/Template ${PROJECT_SOURCE_DIR}/Modules/Tracking ${PROJECT_SOURCE_DIR}/Modules/Viewer ${EIGEN3_INCLUDE_DIR} ${Pangolin_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS} ) link_directories(${OpenCV_LIBRARY_DIRS})

rainleong avatar Jun 08 '21 08:06 rainleong

Hello author, I have another question, that is, where are the camera position and attitude files generated by DFMSLAM, just like CameraTrajectory.txt. thanks~

rainleong avatar Jun 10 '21 06:06 rainleong

Hi! thanks for the note for Opencv is not the first time that it happens! The camera trajectory is not saved. The program only evaluates the relative distance between the map and the camera. The base class for our tracking is the ORBSLAM tracking yet, so I guess that including it should be straightforward.

JoseLamarca avatar Jun 15 '21 12:06 JoseLamarca