0

我昨天能够使用 CMake 编译 zlib,但唯一可能的更改是安装 Windows 10 SDK 10.0.14393.33,现在我使用相同的选择配置它(Visual Studio 14 2015 win64)我收到以下错误: 在此处输入图像描述

在此处输入图像描述

知道可能出了什么问题以及如何解决吗?

The C compiler identification is unknown
CMake Error: Could not find cmake module file: C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/3.7.1/CMakeCCompiler.cmake
CMake Error at CMakeLists.txt:4 (project):
  No CMAKE_C_COMPILER could be found.


Configuring incomplete, errors occurred!
See also "C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/CMakeOutput.log".
See also "C:/Users/mona/playing-for-data/renderdoc/renderdoc/3rdparty/zlib/build /CMakeFiles/CMakeError.log".
4

2 回答 2

1

好吧,真的很奇怪,但事实证明你必须通过右键单击可执行文件并以管理员身份运行它来运行 CMake。我不确定这是否是正确的解决方案,但现在它正在工作!!!

于 2016-12-15T22:03:45.030 回答
1

我有一个类似的问题(在管理员模式下运行 CMake 确实会改变PATH它运行的搜索环境)。

这个问题是特定于CMake 的,msbuild并且也只发生在较新版本的 CMake 中,因为默认构建程序devenv已从msbuild.

对我来说有帮助的是将以下代码放入我的 VS 工具链文件中:

if (CMAKE_VS_DEVENV_COMMAND)
    set(CMAKE_MAKE_PROGRAM "${CMAKE_VS_DEVENV_COMMAND}" CACHE INTERNAL "")
endif()
于 2016-12-16T10:02:25.407 回答