Qt compile error. 13:03:32: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.

  • Here is the whole log of error
    13:03:31: Running build steps for project Qt_Test...
    13:03:31: Configuration unchanged, skipping qmake step.
    13:03:31: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\ActiveQt" -I"release" -I"." -I"..\Qt_Test" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\win32-msvc2010" -Forelease
    C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Release
    'cl' is not recognized as an internal or external command,
    operable program or batch file.
    jom: H:\programs\Qt_Test-build-desktop-Qt_4_8_1_for_Desktop_-_MSVC2010__Qt_SDK__Release\Makefile.Release [release\main.obj] Error 1

    jom 1.0.8 - empower your cores

    jom: H:\programs\Qt_Test-build-desktop-Qt_4_8_1_for_Desktop_-_MSVC2010__Qt_SDK__Release\Makefile [release] Error 2
    13:03:32: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
    Error while building project Qt_Test (target: Desktop)
    When executing build step 'Make'

    My code was working fine yesterday but when today I compiled it I got this error.
    Here is my code

    @#include <QtGui>

    int main(int argv, char **args)
    QApplication app(argv, args);

    QTextEdit textEdit;
    QPushButton but("Quit");

    QObject::connect(&but, SIGNAL(clicked()), app, SLOT(quit()));

    QVBoxLayout lay;

    QWidget win;

    return app.exec();

    Thanks in advance :)

  • Moderators

    Are you starting your compilation through Qt creator or msvc 2010 command prompt?

  • Koahnig I'm using Qt creator.

  • Moderators

    [quote author="Sahil#" date="1346830593"]
    13:03:31: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore" - C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Release
    'cl' is not recognized as an internal or external command,
    operable program or batch file.

    I have stripped down the log you have posted. It cannot find "cl" which is the compiler of msvc. There is probably something wrong with your compile settings, environment.
    Unfortunately, I never used msvc as tool chain with Qt creator.

    BTW this is a release compile. Have you used it yesterday as release compile as well?
    Possibly you have changed the compile mode and it might work for a debug compile and there is only a problem with half of your setup of creator.

  • Nope I didn't not change any of setting of Qt creator. I used release compile yesterday too. Any idea how to solve it?

  • Okay I've changed my compiler to Mingw and it is working fine. But it is giving me this error
    H:\programs\Qt_Test-build-desktop-Qt_4_8_1_for_Desktop_-_MSVC2010__Qt_SDK__Release..\Qt_Test\main.cpp:11: error: no matching function for call to 'QObject::connect(QPushButton*, const char [11], QApplication&, const char [8])'

  • Moderators

    Did you perform a complete rebuild?
    It could be a mix of msvc and mingw object. I wonder why you still have the msvc2010 in your desktop name. Shouldn't it change to something with mingw?
    However, I have only very little experience with Qt creator on windows. Personally I would rerun qmake and make sure that there have been a complete rebuild.

  • I switched to Mingw it's working fine. Thanks for all your efforts.

  • connect() requires a pointer, use &app or qApp.

  • I found that Qt Creator doesn't run qmake. If you do this at the command-line and build from Qt Creator with the resulting Makefile you can then load the .exe file target when Qt Creator tries to run .exe.

    Once you have done this once, ie. the Makefile exists and .exe file setup in Qt Creator it works fine.

    I set the Windows user Environment variable $PATH to include C:\Qt\4.8.3\bin but not sure if that was necessary. The windows installation of Qt shouldn't have these problems.

  • Moderators

    @Boysie: Qmake creates the Makefiles, if creator had not called it then jom would not even try to run the compiler.

    There are indeed situations where creator fails to run qmake though that is needed. This mostly happens when using in-source builds and switching between different setups. There is little we can do to detect that.

    If this happens: Do "Build > Run qmake" inside creator.

  • First, thanks for the speedy reply.
    I've got several issues, so here goes.

    1. Qmake
      Might qmake be generated in the wrong dir? My setup might confuse things.
      I tried deleting my first 4.8.3 Qt installation in C:\Qt\4.8.3 but permissions failed even though I am administrator. I didn't use uninstall as only QtCreator appeared in programs installed.
      I next installed MS Visual C++ 2010 Express and not the VS plugin, as it doesn't work with Express.
      I next installed Qt 4.8.3 for win32 in C:\Qt\4.8.3-vs2010.

    2. Do I have an in-source build?
      I copied the Qt example moveboxes to C:\User\Username\Development\Qt that's all.

    3. Run QtCreator-> Build-> Run qmake
      This option simply isn't listed in the pulldown for some reason.

  • @Sahil

    can u tell me steps how to change to mingw

Log in to reply

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