在做ch7中g2o部分的实验时,出现错误:
Could NOT find CSPARSE (missing: CSPARSE_INCLUDE_DIR CSPARSE_LIBRARY)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CSPARSE_INCLUDE_DIR
一开始我没管它,想直接run,但是点击run后跳出来edit configure,我以为是没有编译器的问题,确认了一下toolchain中编译器是有的。
纳闷了好一会儿,后来才知道是缺少一些依赖包:
sudo apt-get install libsuitesparse-dev
输入命令后还会提示安装一些其他包,安就是了,安装完成后在Clion中reload cmake一下,就成功了。
在运行之前还要配置一下edit configure,高博给的代码输入参数是要设定的,选择好ch7所在的文件路径,参数输入./1.png ./2.png,点击run,就OK了。还有一些其他问题高博做了补充:https://www.cnblogs.com/gaoxiang12/p/4770813.html