Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?

用VS2015的qt插件打开pro文件时报错。

--- (Import): Generating new project of XXX.pro file
--- (qmake) : Using: C:\Qt\Qt5.9.1\5.9.1\msvc2015\\bin\qmake
--- (qmake) : Working Directory: XXX

--- (qmake) : Arguments: -tp vc "XXX.pro" -o "XXX.vcxproj" QMAKE_INCDIR_QT=$(QTDIR)\include QMAKE_LIBDIR=$(QTDIR)\lib QMAKE_MOC=$(QTDIR)\bin\moc.exe QMAKE_QMAKE=$(QTDIR)\bin\qmake.exe


问题原因:

cl.exe Microsoft C/C++编译器,即vs的编译器工具。未找到此工具。


解决方法:

添加VS2015 cl.exe环境变量即可。e.g  vs安装目录在D盘  D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?_第1张图片

你可能感兴趣的:(Error)