CMake引发错误:无法加载缓存 [英] CMake throws Error: could not load cache
本文介绍了CMake引发错误:无法加载缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试构建
解决方案
我想您没有配置项目。
-
您首先需要在项目根目录下运行
cmake。
以生成构建文件。您还可以从一个空目录运行它以分隔源文件和构建文件。
-
然后可以使用
cmake- -build ./
在 build dir 中。
或者,如果您更喜欢仅使用代码:
cd cd [您的项目的根目录]
cmake。
cmake --build ./
I am trying to build Dlib 19.0 examples. I did
cd examples
mkdir build
cd build
cmake ..
cmake --build
to get exe now,
cmake --build
from the examples directory.
CMake throws: Error: could not load cache
Screenshot:
解决方案
I guess you didn't configure your project.
You first need to run
cmake .
at the project root to generate build files. You can also run it from an empty directory to separate source and build files.Then you can use
cmake --build ./
in the build dir.
Or, if you prefer code-only:
cd [root-directory-of-your-project]
cmake .
cmake --build ./
这篇关于CMake引发错误:无法加载缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文