2016-08-05 187 views
0

我試圖運行使用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

回答

0

我得到幾乎相同的情況,除了它安裝的調試器。 只需安裝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進行編譯。

相關問題