![](/img/trans.png)
[英]Conflicting Eigen dependencies when CMake-ing project with Ceres solver
[英]Not found Eigen3_DIR when configuring a cmake project in Windows
我想編譯一個打開的項目 ,它需要Eigen3,我遵循了它的指導方針,但仍停留在此步驟中:
“將環境變量Eigen3_DIR設置為{YOUR_EIGEN3_DIRECTORY} / eigen3 / cmake。”
我已經安裝了CMake gui並在配置后打印了以下錯誤
Make Error at src/CMakeLists.txt:15 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
但是我已經從這里下載了Eigen3,並設置了Eigen3_DIR
如下 那我該怎么辦呢? 我只是cmake的初學者。
我假設您正在使用Windows。 您將需要安裝Visual Studio。 您可以使用社區版本。 您將需要執行以下操作:
這將在安裝目錄中創建Eigen3Config.cmake文件。 在我的情況下,安裝目錄為“ C:\\ Program Files(X86)\\ Eigen3。使用它作為Eigen3_DIR變量的值。默認情況下,Eigen並不隨Eigen3Config.cmake文件一起提供。您將看到Eigen3Config.cmake.in文件,用於構建Eigen3Config.cmake文件。
HTH
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.