Setting up MSVC 2010 compiler in Qt Creator



  • Hello,

    I'm trying to set up Qt Creator to build a GUI application and am getting build errors that I believe have something to do with my compiler not set up correctly. To test the build, I started a "QtDemo" project. I've done nothing to modify any of the default files created, just tried to build the file, in debug mode. The error messages I receive are below. Any insight into how to change my settings so that this builds. I'm suspicious that since the Kit doesn't have a debugger, that's my problem, but I don't know how to fix it. I've included all the details I can think of that would be helpful below. Thank you.

    Project set up:
    File>New File or Project>Applications>Qt GUI Application.
    The Kit Selection is: Desktop Qt 5.1.9 MSVC2010 32 bit, but provides a warning that no debugger is set up. I'm not sure how to set this up.
    The files to be added are:

    main.cpp
    mainwindow.cpp
    mainwindow.h
    mainwindow.ui
    QtDemo.pro

    The settings in Tools>Options>Build & Run:
    Kits: Desktop Qt 5.1.0 MSVC2012 32 bit
    Qt Versions: Qt 5.1.0 MSVC2010 32bit C:\Qt\Qt5.1.0\5.1.0\msvc2010\bin\qmake.exe
    Compilers: Microsoft Visual C++ Compiler 10.0 (x86) (other options are: amd64, or 0.9 (x86))
    CMake: text box empty

    I installed Visual Studio 2010 prior to installing Qt Creator.

    Error Messages:
    C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -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"......\Qt\Qt5.1.0\5.1.0\msvc2010\include" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtWidgets" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtGui" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtANGLE" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\EILEEN~1\AppData\Local\Temp\main.obj.1320.15.jom
    'cl' is not recognized as an internal or external command,
    operable program or batch file.
    jom: C:\Users\Eileen Mazzochette\build-QtDemo-Desktop_Qt_5_1_0_MSVC2010_32bit-Debug\Makefile.Debug [debug\main.obj] Error 1
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -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"......\Qt\Qt5.1.0\5.1.0\msvc2010\include" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtWidgets" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtGui" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtANGLE" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\EILEEN~1\AppData\Local\Temp\mainwindow.obj.1320.31.jom
    'cl' is not recognized as an internal or external command,
    operable program or batch file.
    'cl' is not recognized as an internal or external command,
    operable program or batch file.
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -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"......\Qt\Qt5.1.0\5.1.0\msvc2010\include" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtWidgets" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtGui" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtANGLE" -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\include\QtCore" -I"debug" -I"." -I"." -I"......\Qt\Qt5.1.0\5.1.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\EILEEN~1\AppData\Local\Temp\moc_mainwindow.obj.1320.31.jom
    jom: C:\Users\Eileen Mazzochette\build-QtDemo-Desktop_Qt_5_1_0_MSVC2010_32bit-Debug\Makefile.Debug [debug\mainwindow.obj] Error 1
    jom: C:\Users\Eileen Mazzochette\build-QtDemo-Desktop_Qt_5_1_0_MSVC2010_32bit-Debug\Makefile.Debug [debug\moc_mainwindow.obj] Error 1
    jom: C:\Users\Eileen Mazzochette\build-QtDemo-Desktop_Qt_5_1_0_MSVC2010_32bit-Debug\Makefile [debug] Error 2
    11:39:37: The process "C:\Qt\Qt5.1.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project QtDemo (kit: Desktop Qt 5.1.0 MSVC2010 32bit)
    When executing step 'Make'

    System Info:

    Windows 7
    Qt Creator 2.7.2 Based on Qt 5.1.0 (32bit)
    This is the version I downloaded and installed: Qt 5.1.0 for Windows 32-bit (VS 2010, 505 MB) (Info))

    Info for Visual Studio:

    Microsoft Visual Studio 2010
    Version 10.0.30319.1 RTMRel
    Microsoft .NET Framework
    Version 4.0.30319 RTMRel
    Installed Version: Professional
    Microsoft Office Developer Tools 01018-532-2002102-70189
    Microsoft Visual Basic 2010 01018-532-2002102-70189
    Microsoft Visual C# 2010 01018-532-2002102-70189
    Microsoft Visual C++ 2010 01018-532-2002102-70189
    Microsoft Visual F# 2010 01018-532-2002102-70189
    Microsoft Visual Studio 2010 Team Explorer 01018-532-2002102-70189
    Microsoft Visual Web Developer 2010 01018-532-2002102-70189
    Crystal Reports Templates for Microsoft Visual Studio 2010
    Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2542054) KB2542054
    Microsoft Visual Studio 2010 SharePoint Developer Tools 10.0.30319
    Security Update for Microsoft Visual Studio 2010 Professional - ENU (KB2251489) KB2251489
    Security Update for Microsoft Visual Studio 2010 Professional - ENU (KB2644980) KB2644980



  • I get the same errors when I try to build for release (as opposed to debug).
    Thanks!
    -Eileen


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    For the debugger you have to install the "Visual Studio debugging tools" (you can find them on Microsoft site), you might however encounter some problem while installing it (you can follow that "part":http://qt-project.org/wiki/Building_Qt_5_from_Git#aea23489ce3aa9b6406ebb28e0cda430 of the Building Qt 5 from Git guide to resolve it.

    For the cl missing part, try again after installing the debugging tools, If it still is a problem, you might be missing the path to your Visual Studio binaries in the PATH environment variable (which would be surprising but can happen)

    Hope it helps



  • I tried to install the Windows Debugging Tools through the Windows 7 SDK (http://www.microsoft.com/en-us/download/details.aspx?id=8279) and I get an error in installation, even if I just try to install the debugger tools that come with it. Do you know how I would get the debugging tools if not through Windows 7 SDK? I got Visual Studio through DreamSpark.
    I'm doing this from an admin account on my PC so I don't know why I'm getting install errors.

    Thanks!

    -Eileen


  • Lifetime Qt Champion


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.