Sophus库报错 fatal error:fmt/core.h: No such file or directory 解决
在跑《视觉SLAM十四讲》(第二版)中第5讲5.4.2节 RGB-D视觉中代码时遇到了报错:
/usr/local/include/sophus/common.hpp:42:10: fatal error:fmt/core.h: No such file or directory
#include <fmt/core.h>
^~~~~~~~~~
compilation terminated.
[报错信息为手敲 😦 ]
解决方案如下:
在CMakeLists.txt文件中添加(如图中红线标注)
target_link_libraries( [你定义的可执行文件名,如jointMap] Sophus::Sophus )
修改完程序正常编译,运行无误。
附环境:
系统:Ubuntu18.04 LTS
Sophus库:参考以下博客安装:
https://blog.csdn.net/veryneo/article/details/108021869