QtCreator qmake Cannot run compiler 'cl'

后端 未结 4 1478
死守一世寂寞
死守一世寂寞 2021-02-07 16:11

Just configured new windows environment with MSVS 2017 and Qt5.9.1.
While building example project bars met an error

Project ERROR: Cannot run c         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 16:49

    I had a similar case, which was solved by adding the path to cl.exe to the path environment variable:

    set path=%path%;%qtdir%\bin;"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\Hostx64\x64"
    set QMakeSpec=win32-msvc
    qmake -tp vc
    

    Maybe another cl.exe is interfering here?

提交回复
热议问题