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:
- The reasons and common solutions of vs flash back on the road of C + + Learning (with reasons attached)
- Vs error prompt: “unable to open source file XXXX. H” possible reasons and Solutions
- How to Solve Azkaban error (Reasons & Solutions)
- Mac reports an error zsh: fork failed: resource temporarily unavailable (reasons and solutions)
- Causes and solutions of WordPress media library pictures not showing or showing errors
- Vs2015 configuring OpenGL development environment: configuration of glfw library and glad Library
- Form Compile Issues: (FRM-18108: Failed to load the following objects)
- Configuring glfw library and glad Library in opengl-vs2015
- OpenGL, such as glad library and glfw library, is incompatible
- Several reasons of program flashback crash
- Raspberry Pi 3 installation and software configuration issues collection
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- Reasons for being rejected immediately after telnet
- Dataframe to numpy.ndarray Related issues of
- How to Fix Install VMware Tools Grayed out Issues 2022
- The reasons for the following errors occurred when opening the webgl project of unity
- tomcat Issues org.apache.catalina.LifecycleException: Failed to start component
- [Handling Notes] Alternative reasons for Configuration system failed to initialize exception
- How to generate lib library with keil MDK and use lib Library
- Synergy 1.4.12 “ipc connection error, connection refused” and other issues