-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libvkit_common Undefined Reference #21
Comments
did you checkout the right version of sophus?
|
Yes, Its that version. Just to make sure, I rebuild it. It still gives the same error |
Just encountered the exact same problem. Can't seem to figure out a solution. Any help would be appreciated. |
I tried to add the suggested line set{Sophus_LIBRARIES libSophus.so} to ~/catkin_ws/src/rgp_vikit/vikit_common/CMakeLists.txt. But that did not work and got an error instantly "set{{Sophus_LIBRARIES". Then I changed the line to SET(Sophus_LIBRARIES libSophus.so). That error was gone. So I went to ~/catkin_ws/Sophus/build/ directory and did a "sudo make install" and catkin_make again. |
yes, that should be set(Sophus_LIBRARIES libSophus.so) rather than set{Sophus_LIBRARIES libSophus.so} |
Thanks! |
thanks |
I had the same problem. Adding SET(Sophus_LIBRARIES libSophus.so) and using make install worked for me as well. May add this line as a fix? |
Please fix this. Otherwise I will create a pull request with the correct and modified CMakeLists.txt to handle this error. |
FYI this issue exists for both vikit and svo compile |
Unfortunately, adding SET ... for sophus for the svo compile, though works, when svo is run, one gets: |
@binary42 Did you figure out one way to solve the issue? I got the same error as well. Just like you said, "very frustrating". Thanks very much! |
[ 88%] Built target vikit_common __ |
Go to vikit_common directory:
####################################### Set build flags. Set IS_ARM on odroid board as environment variableSET(CMAKE_CXX_FLAGS "-Wall -D_LINUX -D_REENTRANT -march=native -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas") Add plain cmake packagesFIND_PACKAGE(OpenCV REQUIRED) Include dirsINCLUDE_DIRECTORIES( IF(USE_ROS) Set SourcefilesLIST(APPEND SOURCEFILES src/atan_camera.cpp Create vikit libraryset(Sophus_LIBRARIES libSophus.so) IF(USE_ROS) ##Tests ADD_EXECUTABLE(test_vk_common_triangulation test/test_triangulation.cpp) ADD_EXECUTABLE(test_vk_common_patch_score test/test_patch_score.cpp) ################################################################################ Create the vikit_commonConfig.cmake file for other cmake projects.IF(NOT USE_ROS) INSTALL(DIRECTORY include/vikit DESTINATION ${CMAKE_INSTALL_PREFIX}/include FILES_MATCHING PATTERN "*.h" ) ########################################### |
I am having these errors during the compilation process, any ideas?
/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::exp(Eigen::Matrix<double, 6, 1, 0, 6, 1> const&)' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::operator=(Sophus::SE3 const&)'/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::SE3()' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::SE3(Sophus::SE3 const&)'/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::operator*(Sophus::SE3 const&) const' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SO3::matrix() const'/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::SE3(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::operator_(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) const'collect2: ld returned 1 exit status
make[2]: ** [/home/bvibhav/catkin_ws/devel/lib/vikit_common/test_vk_common_camera] Error 1
make[1]: *** [rpg_vikit/vikit_common/CMakeFiles/test_vk_common_camera.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::exp(Eigen::Matrix<double, 6, 1, 0, 6, 1> const&)' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::operator=(Sophus::SE3 const&)'/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::SE3()' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::SE3(Sophus::SE3 const&)'/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::operator*(Sophus::SE3 const&) const' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SO3::matrix() const'/home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::SE3(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)' /home/bvibhav/catkin_ws/devel/lib/libvikit_common.so: undefined reference to
Sophus::SE3::operator(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) const'collect2: ld returned 1 exit status
make[2]: *_* [/home/bvibhav/catkin_ws/devel/lib/vikit_common/test_vk_common_triangulation] Error 1
make[1]: *** [rpg_vikit/vikit_common/CMakeFiles/test_vk_common_triangulation.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
The text was updated successfully, but these errors were encountered: