This blog records the errors encountered in the process of using sophus.
1. Cannot find header file fatal error: sophus/SO3 HPP: no such file or directory
1.1 problem description
fatal error: sophus/so3.hpp: no such file or directory
Reason:
GitHub is now a new version of sophus, which is based on the template class, and its corresponding header file is .h
, while the header file corresponding to sophus based on non-template class is .hpp
, so an error will be reported.
1.2 solutions
Put in the code
#include "sophus/so3.hpp"
#include "sophus/se3.hpp"
sophus::sophus SO3d;
sophus::sophus SE3d;
Change all to
#include "sophus/so3.h"
#include "sophus/se3.h"
sophus::sophus SO3;
sophus::sophus SE3;
2. /usr/bin/LD: not found - lsophus:: sophus
2.1 error reporting prompt
Compilation error
/usr/bin/ld: Could not find -lSophus::Sophus
/usr/bin/ld: Could not find -lSophus::Sophus
collect2: error: ld returned 1 exit status
2.2 solutions
My original cmake:
list(APPEND ALL_TARGET_LIBRARIES ${Sophus_LIBRARIES} Sophus::Sophus)
target_link_libraries( useSophus ${Sophus_LIBRARIES} Sophus::Sophus)
Modify to
list(APPEND ALL_TARGET_LIBRARIES ${Sophus_LIBRARIES})
target_link_libraries( useSophus ${Sophus_LIBRARIES})
Read More:
- Visual slam Lesson 6: curve fitting with g2o, error: cmake error at CMakeList.txt (find_ package) By not providing“FindG2O.cmake“
- Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid
- Undefined reference to ‘CV:: imread (CV:: String const & int)’
- Howto Install and Configure VTK on Ubuntu
- Linux QT download / usr / include / C + + / 7/ cstdlib:75 : 15: fatal error: stdlib. H: no such file or directory error
- fatal error LNK2019[UNK]fatalerror LNK1120
- Mac clion configuring opencv environment
- #During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory
- caffe deep learning [three] compilation error: fatal error: hdf5.h: No such file or directory compilation terminated.
- About the prompt: invalid use of incomplete type
- Ubuntu 18.04 installation of opencv2.4.13 encountered fatal error. Possible solutions
- Error: expected class name before ‘{‘ token
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- A fatal error C1083 occurred when compiling C + + code under. Net: unable to open the include file: “xuhk”_ Jnihelloworld. H “: solution to no such file or directory error.
- Summary of problems encountered in compiling opengl code
- Clion MinGW super fast configuration OpenGL development environment
- Vtk8.2.0 (32bit + 64bit) compilation and installation test (win10 + vs2017 + Qt5)
- Some small problems in using vs2017
- Error c2011: “a certain class”: redefinition of “class” type
- gcc /usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory