Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake throws Error: could not load cache

Tags:

cmake

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:

enter image description here

like image 275
Ramasamy Viswanathan Avatar asked Aug 11 '16 05:08

Ramasamy Viswanathan


2 Answers

I guess you didn't configure your project.

  1. 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.

  2. 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 ./ 
like image 181
arrowd Avatar answered Sep 19 '22 12:09

arrowd


You could try:

  1. Make sure you have enough space / correct permissions etc for the generated files to be created
  2. Remove all generated files e.g. CmakeCache.txt and re-run cmake ..; check the output carefully for potential issues during this step, missing libraries etc.
like image 29
paul-g Avatar answered Sep 22 '22 12:09

paul-g