Example Application Build: Error 2



  • Hey, I've been trying to figure out this problem for a few days now with no luck so far.
    Whenever I try to build I get an error code 2. Here's my build log:
    @17:36:23: Running steps for project application...
    17:36:23: Configuration unchanged, skipping qmake step.
    17:36:23: Starting: "C:\Qt\Qt5.2.1\Tools\QtCreator\bin\jom.exe"
    C:\Qt\Qt5.2.1\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\application.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"........\include" -I"........\include\QtWidgets" -I"........\include\QtGui" -I"........\include\QtANGLE" -I"........\include\QtCore" -I"debug" -I"." -I"........\mkspecs\win32-msvc2012" -Fodebug\ @C:\Users\tyler_2\AppData\Local\Temp\main.obj.3704.31.jom
    jom: C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\examples\widgets\mainwindows\build-application-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile.Debug [debug\main.obj] Error 2
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\application.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"........\include" -I"........\include\QtWidgets" -I"........\include\QtGui" -I"........\include\QtANGLE" -I"........\include\QtCore" -I"debug" -I"." -I"........\mkspecs\win32-msvc2012" -Fodebug\ @C:\Users\tyler_2\AppData\Local\Temp\mainwindow.obj.3704.31.jom
    jom: C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\examples\widgets\mainwindows\build-application-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile.Debug [debug\mainwindow.obj] Error 2
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\application.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"........\include" -I"........\include\QtWidgets" -I"........\include\QtGui" -I"........\include\QtANGLE" -I"........\include\QtCore" -I"debug" -I"." -I"........\mkspecs\win32-msvc2012" -Fodebug\ @C:\Users\tyler_2\AppData\Local\Temp\qrc_application.obj.3704.31.jom
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\application.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"........\include" -I"........\include\QtWidgets" -I"........\include\QtGui" -I"........\include\QtANGLE" -I"........\include\QtCore" -I"debug" -I"." -I"........\mkspecs\win32-msvc2012" -Fodebug\ @C:\Users\tyler_2\AppData\Local\Temp\moc_mainwindow.obj.3704.31.jom
    jom: C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\examples\widgets\mainwindows\build-application-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile.Debug [debug\qrc_application.obj] Error 2
    jom: C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\examples\widgets\mainwindows\build-application-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile.Debug [debug\moc_mainwindow.obj] Error 2
    jom: C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\examples\widgets\mainwindows\build-application-Desktop_Qt_5_2_1_MSVC2012_64bit-Debug\Makefile [debug] Error 2
    17:36:23: The process "C:\Qt\Qt5.2.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project application (kit: Desktop Qt 5.2.1 MSVC2012 64bit)
    When executing step 'Make'
    17:36:23: Elapsed time: 00:00.@

    After searching Google for hours I still can't find out what the problem is, I think it's something to do with my environment variables. Here is my Path variable:
    @
    c:\windows\system32;
    C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\bin;
    C:\windows\system32;
    C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
    C:\Program Files\Common Files\Microsoft Shared\Windows Live;
    C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
    "c:\Program Files\Java\jre6\bin". If you use 32-bit Java on a 64-bit OS use: ;
    "c:\Program Files (x86)\Java\jre6\bin";
    C:\Program Files (x86)\Windows Live\Shared;
    C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;
    C:\Program Files\Microsoft SQL Server\100\Tools\Binn;
    C:\Program Files\Microsoft SQL Server\100\DTS\Binn;
    C:\cmake-2.8.10.2-win32-x86\bin;
    C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;
    C:\Program Files (x86)\QuickTime\QTSystem;
    C:\Program Files\Common Files\Autodesk Shared;
    C:\Program Files (x86)\Autodesk\Backburner;
    C:\Program Files\Microsoft SQL Server\110\Tools\Binn;
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin;
    @

    Thanks for reading.



  • You have a 32bit VS in the PATH but you are using a 64-bit Qt library. You need to set up the 64-bit compiler environment.


Log in to reply
 

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