我正在尝试下载一个名为 Fluidsynth ( https://sourceforge.net/p/fluidsynth ) 的 C 程序,以便稍后安装 Python 绑定(bind)并在某些代码中使用它。
我安装了 CMake 和 Visual Studio。我从 VS 命令行(以管理员身份)输入命令 cmake c:\path\to\fluidsynth
。我遇到了一些错误:
在命令行中,我发现无法找到 CMAKE_C_COMPILER。
在 CMake 错误日志中显示
Build FAILED
然后: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". [C:\Users\user\Desktop\fluidsynth-1.1.6\CMakeFiles\3.4.3\CompilerIdC\CompilerIdC.vcxproj]
即使在升级我的 Windows SDK 后,此错误仍然存在。
最佳答案
1.- Visual Basic?? CMake 没有对 VB 的 native 支持。
2.- 如果您要使用 CMake,则必须确保 Win SDK 正确注册其路径。
3.- 完成后,您只需从提取文件的目录中运行以下命令:cmake 。
如果仍然出现错误,则说明某些内容未正确注册或安装。那不是 cmake 的错误。
关于winapi - CMake 找不到 Windows SDK 8.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36362469/