'cl'不被识别为内部或外部命令

问题描述:

我试图运行使用MSVC的Qt应用程序。我安装了Visual C++,并且还为CL设置了PATH,此外,每当我在常规命令提示符中尝试使用cl时,它都可以正常工作。'cl'不被识别为内部或外部命令

然而,在QtCreator,运行时/调试我的申请,我得到以下错误:将鼠标悬停在组件时

'cl' is not recognized as an internal or external command, 
operable program or batch file. 
jom: C:\Users\Censored\Documents\Qt\build-Shard-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\mainwindow.obj] Error 1 
jom: C:\Users\Censored\Documents\Qt\build-Shard-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug\Makefile [debug] Error 2 
11:38:32: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2. 
Error while building/deploying project Shard (kit: Desktop Qt 5.7.0 MSVC2015_64bit) 

,并在我的构建&运行我的工具箱选项卡上,我得到这样的警告我我使用的编译:

enter image description here

我需要,因为我需要使用QtWebEngineWidgets使用MSVC。任何帮助,将不胜感激。

+0

要说明这一点,您需要配置Qt Creator或重新安装野兽。 –

+0

是否在你的路径? – adrianN

我得到几乎相同的情况,除了它安装的调试器。 只需安装Windows SDK,对于Windows 10就是here

CMake警告意味着编译器不能被CMake找到,我认为cl.exe不会被发现进行编译。

我安装了VS和我需要的所有工具(C++编译器,Windows SDK 10.0.10586,Tools和Windows SDK),问题仍然存在。然后,我下载了VS 2015 ISO,并手动安装了包BuildTools_MSBuildDev12_amd64BuildTools_MSBuildDev12_x86,而不是通过常规设置,并且它可以正常工作。所有的警告消失了,我可以用MSVC2015进行编译。