1

当我尝试在 Windows 上构建 yaml-cpp 时,我不断收到错误消息。使用 CMake gui 应用程序,我正确选择了 build- 和 sourcepath,但是一旦我点击“配置”按钮,就会抛出以下错误:

CMake Error: CMake was unable to find a build program corresponding to "**MinGW Makefiles**".  **CMAKE_MAKE_PROGRAM** is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/Users/Robert/Programs/Lib/yaml-cpp/build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Users/Robert/Programs/Lib/yaml-cpp/build/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!

我知道这与所选的生成器有关,我选择了 CodeBlocks - MinGW Makefiles。但是我已经正确安装了 CodeBlocks。那么有没有办法手动设置CMAKE_MAKE_PROGRAM变量?

4

0 回答 0