为qt和visualstudio 2010配置环境变量



我已经安装了:Visual Studio 2010。qt-windows-pensource-5..1.0-msvc2010-x86-offline和qt-vs-addin-1.2.2-开源

一切都很好,我能够使用qtcreator创建应用程序并编译和运行它

但我修改了环境变量的原始路径:http://img850.imageshack.us/img850/382/nh4e.png

现在,当尝试使用qt创建者运行应用程序时,我收到了以下错误:

'cl' is not recognized as an internal or external command,
operable program or batch file.
jom: C:C++Qtbuild-tesst-Desktop_Qt_5_1_0_MSVC2010_32bit-DebugMakefile.Debug [debugmainwindow.obj] Error 1
jom: C:C++Qtbuild-tesst-Desktop_Qt_5_1_0_MSVC2010_32bit-DebugMakefile [debug] Error 2
20:54:01: The process "C:QtQt5.1.0ToolsQtCreatorbinjom.exe" exited with code 2.
Error while building/deploying project tesst (kit: Desktop Qt 5.1.0 MSVC2010 32bit)
When executing step 'Make'

我已经在互联网上读了几十个线程,但什么都没有,我已经重新安装了qt-windows-opensource-5..1.0-msvc2010-x86-offline和qt-vs-addin-1.2.2-开源

但是仍然是相同的错误。

稍后编辑:程序不会仅从qt创建者运行。如果我在visualstudio2010上导入qt项目,它可以编译并运行应用程序。

当您从环境中修改原始路径变量时,自动检测QtCreator工具更改可能不会检测到编译器(您的案例VS编译器)。因此,要解决这个问题,您需要正确更新路径变量,或者手动将vs编译器添加到toolchane和Build中。您也可以尝试使用MinGw编译器。

最新更新