Cmake Error: could not load cache

前端 未结 11 2436
无人共我
无人共我 2020-12-15 14:47

I\'m using Cmake to try to build a project for Eclipse. When I try running Cmake, I get the following error:

Error: could not load cache
Error: Batch build s         


        
相关标签:
11条回答
  • 2020-12-15 15:28

    If you are using the CLion, you can use File---"Reload CMake Project".

    I meet this problem after using git force pull, and Reload CMake Project solves it.

    0 讨论(0)
  • 2020-12-15 15:30

    If you are absolutely positive that you are running the build command from the binary directory, this error probably means that you have had an issue during the configuration/generation step that you should have ran before trying the build. You can try to configure again to check (cmake your-build-dir)

    I would advise running the Gui and trying to load the cache to see if you get a more explicit error (although I doubt it).

    Another possibility would be to try to create a new clean build directory and take it from there.

    0 讨论(0)
  • 2020-12-15 15:34

    In your example Eclipse must run something like

    cmake --build folder_name --target all
    

    and I opt that the *folder_name* is bad in this case. You probably messed something up in Eclipse.

    0 讨论(0)
  • 2020-12-15 15:39

    For me it helps to select CMake tab (next to Run, TODO) in CLion. Then click the Reload CMakeProject button.

    0 讨论(0)
  • 2020-12-15 15:42

    run cmake --configure . it should generate required files.

    0 讨论(0)
  • 2020-12-15 15:45

    If you are using Visual Studio 2019, close Visual Studio, delete .vs and out folders then rebuild your project.

    0 讨论(0)
提交回复
热议问题