gaoxiang12 / slambook2

edition 2 of the slambook
MIT License
5.46k stars 2.01k forks source link

我是小白,请问为什么我把这里的代码拷贝到虚拟机里以后,3rdparty的各个子目录都是空的啊? #294

Closed initialwing closed 9 months ago

initialwing commented 9 months ago

还有就是ch4的Sophus_INCLUDE_DIRS具体是什么路径?是3rdparty/Sophus吗?

initialwing commented 9 months ago

还有就是ch4的Sophus_INCLUDE_DIRS具体是什么路径?是3rdparty/Sophus吗?

哦是不是不用把具体路径写出来,直接Sophus_INCLUDE_DIRE就行,但是我cmake还是会报错找不到sophus,还是回到原来的问题,3rdparty下的子目录都是空的

initialwing commented 9 months ago

现在我下载了作者提供的镜像文件,3rdparty下有文件了,但在编译useSophus.cpp时还是报错 CMake Error at CMakeLists.txt:5 (find_package): By not providing "FindSophus.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Sophus", but CMake did not find one.

Could not find a package configuration file provided by "Sophus" with any of the following names:

SophusConfig.cmake
sophus-config.cmake

Add the installation prefix of "Sophus" to CMAKE_PREFIX_PATH or set "Sophus_DIR" to a directory containing one of the above files. If "Sophus" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred! See also "/home/zjw/slambook2/ch4/build/CMakeFiles/CMakeOutput.log". 不知道该怎么解决

KunYi commented 9 months ago

check this command first "git submodule update --init --recursive"

KunYi commented 9 months ago

and ref. https://github.com/Offliners/learn_slambook2

initialwing commented 9 months ago

and ref. https://github.com/Offliners/learn_slambook2

Thank you! Through this ref I fixed this bug. It turns out that I just downloaded codes of Sophus but did not compiled it.