CMake does not find Visual C++ compiler

前端 未结 27 2318
小鲜肉
小鲜肉 2020-11-29 18:51

After installing Visual Studio 2015 and running CMake on a previous project, CMake errors stating that it could not find the C compiler.

The C compiler ident         


        
27条回答
  •  醉梦人生
    2020-11-29 19:13

    For me, I checked the CMakeError.log file and found:

    [...] error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".

    This is despite using Visual Studio 2017 on Windows 7. So it appears that CMake is trying to build its detection project with the Windows 8.1 SDK.

    I used the Visual Studio installer to add that component and now CMake is happy as a clam.

提交回复
热议问题