Running error: undefined symbol: _ZNK5gtsam Refer to the solution
written in front
Own environment: Ubuntu18.04, ROS-melodic, source code installation gtsam
1. undefined symbol: _ZNK5gtsam16NoiseModelFactor5PrintERKNSt7
Reference solution
1. Problem description
When running the program using gtsam by itself, the compilation is successful, but the following error occurs when running:
undefined symbol: _ZNK5gtsam16NoiseModelFactor5PrintERKNSt7
2. Refer to the solution
gtsam/build
Execute directly in the original gtsam compilation folder sudo make install
to reinstall gtsam, and then run the program again to execute normally. (Maybe it is caused by the instability of gtsam?)
(If the above method is unsuccessful, try to build/
delete the folder, execute again cmake ..
, make
, sudo make install
to reinstall gtsam.)
2. undefined symbol: _ZNK5gtsam4Rot3mlERKN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEE
Reference solution
1. Problem description
When running the program using gtsam by itself, the compilation is successful, but the following error occurs when running:
undefined symbol: _ZNK5gtsam4Rot3mlERKN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEE
2. Refer to the solution
Specify the version of gtsam CMakeLists.txt
in the in the error programgtsam
find_package()
find_package(GTSAM REQUIRED QUIET)
changed to
find_package(GTSAM 4 REQUIRED QUIET)