Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11539

Qt Creator cannot find Visual Studio compiler (cl.exe) during build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.1.0-rc1
    • Qt Creator 3.0.0, Qt Creator 3.0.1
    • None

    Description

      Qt Creator 3.x cannot find cl.exe during build (some details can be found here http://qt-project.org/forums/viewthread/32276/#159744 )

      Try to reproduce this issue on my environment (see the attached set.txt file, there is my environment before running Qt Creator):

      • Qt 5.2.1
      • Qt Creator 3.0.1
      • Visual Studio 2010 Express
      • Visual Studio 2012 Express
      • Windows 8.1 64bit
      • Windows SDK for Windows 8.1

      1. Open Qt Creator
      2. Check Options\Build & Run
      a) Kits: you can see in the attached file (qtcreatorkits.PNG) that all studios are detected by Qt Creator very well
      b) Qt: see the qtcreatorqt.PNG picture
      c) Compilers: also everything is ok (qtcreatorcompiler.PNG)
      d) Debuggers: qtcreatordebuggers.PNG

      3. Create Qt Widgets Application (qtcreatorwidgetproject.PNG)
      4. Open Projects for the just created project and select the MSVC 2010 32bit kit (qtcreatorwidgetprojectbuildsettings.PNG)
      5. Watch the Build Environment (qtcreatorwidgetprojectbuildenv1.PNG and qtcreatorwidgetprojectbuildenv2.PNG) As you can see there is nothing related to Visual Studio
      6. Try to build the project:

      13:10:01: Running steps for project widgetproject...
      13:10:01: Starting: "C:\Qt\5.2.1\msvc2010\bin\qmake.exe" F:\Tolik\Work\Qt\widgetproject\widgetproject.pro -r -spec win32-msvc2010 "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
      13:10:02: The process "C:\Qt\5.2.1\msvc2010\bin\qmake.exe" exited normally.
      13:10:02: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe"
      C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
      C:\Qt\5.2.1\msvc2010\bin\uic.exe ..\widgetproject\mainwindow.ui -o ui_mainwindow.h
      cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\widgetproject.pdb -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I"C:\Qt\5.2.1\msvc2010\include" -I"C:\Qt\5.2.1\msvc2010\include\QtWidgets" -I"C:\Qt\5.2.1\msvc2010\include\QtGui" -I"C:\Qt\5.2.1\msvc2010\include\QtANGLE" -I"C:\Qt\5.2.1\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\5.2.1\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\80BA~1\AppData\Local\Temp\main.obj.11328.0.jom
      "cl" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ©
      Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬.
      C:\Qt\5.2.1\msvc2010\bin\moc.exe -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -D_MSC_VER=1600 -D_WIN32 -I"C:\Qt\5.2.1\msvc2010\include" -I"C:\Qt\5.2.1\msvc2010\include\QtWidgets" -I"C:\Qt\5.2.1\msvc2010\include\QtGui" -I"C:\Qt\5.2.1\msvc2010\include\QtANGLE" -I"C:\Qt\5.2.1\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"C:\Qt\5.2.1\msvc2010\mkspecs\win32-msvc2010" ..\widgetproject\mainwindow.h -o debug\moc_mainwindow.cpp
      jom: F:\Tolik\Work\Qt\build-widgetproject-Desktop_Qt_5_2_1_MSVC2010_32bit-Debug\Makefile.Debug [debug\main.obj] Error 1
      jom: F:\Tolik\Work\Qt\build-widgetproject-Desktop_Qt_5_2_1_MSVC2010_32bit-Debug\Makefile [debug] Error 2
      13:10:03: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
      Error while building/deploying project widgetproject (kit: Desktop Qt 5.2.1 MSVC2010 32bit)
      When executing step 'Make'
      13:10:03: Elapsed time: 00:01.

      The peace of the output is unreadable
      "cl" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ©
      Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬.

      That means that the visual studio compiler ("cl"( is not found. This is another problem on Windows, Qt Creator cannot read system console encoding (in my case this is 866)

      It would be good if you will find solution for this issue with because now I have start the Qt Creator via the hand made script:

      @echo off
      @call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
      start C:\Qt\Tools\QtCreator\bin\qtcreator.exe

      and if I want to change on Visual Studio 2012 I have to exit from Qt Creator and run another script

      @echo off
      @call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
      start C:\Qt\Tools\QtCreator\bin\qtcreator.exe

      It is not very usefull for development.

      Thanks in advance.

      BR,
      Anatoly Shirokov

      Attachments

        1. qtcreatorcompiler.PNG
          qtcreatorcompiler.PNG
          51 kB
        2. qtcreatordebuggers.PNG
          qtcreatordebuggers.PNG
          60 kB
        3. qtcreatorkits.PNG
          qtcreatorkits.PNG
          58 kB
        4. qtcreatorqt.PNG
          qtcreatorqt.PNG
          53 kB
        5. qtcreatorwidgetproject.PNG
          qtcreatorwidgetproject.PNG
          49 kB
        6. qtcreatorwidgetprojectbuildenv1.PNG
          qtcreatorwidgetprojectbuildenv1.PNG
          37 kB
        7. qtcreatorwidgetprojectbuildenv2.PNG
          qtcreatorwidgetprojectbuildenv2.PNG
          37 kB
        8. qtcreatorwidgetprojectbuildsettings.PNG
          qtcreatorwidgetprojectbuildsettings.PNG
          87 kB
        9. set.txt
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dt Daniel Teske
            anatolys Anatoly Shirokov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes