Fresh QT 471 won't compile example projects



  • Hi Forum,
    I'm new to QT since a few weeks back now. After installation of the windows SDK on a Win Vista using only default options I'm still not able to get the build of the included examples to build. My goal is to design for Android mobiles and if feasible also for UIQ.

    After launching QT Creator I open the appchooser example, select the Edit view and starts Build Project "appchooser" from the Build menu. This results in error message stating "no main.moc". At other forums I found this should be fixed by running Clean All, qmake and thereafter Build, but I still get the following Compiler Output:

    XXXX Clean All: Several read remarks but at the end a reasuring "exited normally" XXXXX

    Running build steps for project appchooser...
    Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" clean -w
    mingw32-make: Entering directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug clean

    mingw32-make[1]: Entering directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    del tmprccdebug_sharedqrc_appchooser.cpp

    del tmpmocdebug_sharedmain.moc

    del tmpobjdebug_sharedmain.o tmpobjdebug_sharedqrc_appchooser.o

    mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Release clean

    mingw32-make[1]: Entering directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    del tmprccrelease_sharedqrc_appchooser.cpp

    del tmpmocrelease_sharedmain.moc

    Could Not Find C:Qt2010.05qtexamplesanimationappchooser-build-desktoptmprccrelease_sharedqrc_appchooser.cpp

    del tmpobjrelease_sharedmain.o tmpobjrelease_sharedqrc_appchooser.o

    mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    mingw32-make: Leaving directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    Could Not Find C:Qt2010.05qtexamplesanimationappchooser-build-desktoptmpmocrelease_sharedmain.moc

    Could Not Find C:Qt2010.05qtexamplesanimationappchooser-build-desktoptmpobjrelease_sharedmain.o

    The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited normally.

    XXXX Run qmake: "exited normally" XXXXX
    Running build steps for project appchooser...
    Starting: "c:/qt/2010.05/qt/bin/qmake.exe" C:/Qt/2010.05/qt/examples/animation/appchooser/appchooser.pro -r -spec win32-g++
    The process "c:/qt/2010.05/qt/bin/qmake.exe" exited normally.

    XXXX Build Project "appchooser": "main.moc: no such file or directory" XXXXX
    Running build steps for project appchooser...
    Configuration unchanged, skipping qmake step.
    Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
    mingw32-make: Entering directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug all

    mingw32-make[1]: Entering directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    C:Qt2010.05qtbinmoc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"......includeQtCore" -I"......includeQtGui" -I"......include" -I"......includeActiveQt" -I"tmpmocdebug_shared" -I"..appchooser" -I"." -I"......mkspecswin32-g++" -D__GNUC__ -DWIN32 ..appchoosermain.cpp -o tmpmocdebug_sharedmain.moc

    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"......includeQtCore" -I"......includeQtGui" -I"......include" -I"......includeActiveQt" -I"tmpmocdebug_shared" -I"..appchooser" -I"." -I"......mkspecswin32-g++" -o tmpobjdebug_sharedmain.o ..appchoosermain.cpp

    c:Qt2010.05qtbinrcc.exe -name appchooser ..appchooserappchooser.qrc -o tmprccdebug_sharedqrc_appchooser.cpp

    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"......includeQtCore" -I"......includeQtGui" -I"......include" -I"......includeActiveQt" -I"tmpmocdebug_shared" -I"..appchooser" -I"." -I"......mkspecswin32-g++" -o tmpobjdebug_sharedqrc_appchooser.o tmprccdebug_sharedqrc_appchooser.cpp

    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debugappchooser.exe tmp/obj/debug_shared/main.o tmp/obj/debug_shared/qrc_appchooser.o -L"c:Qt2010.05qtlib" -L"c:Qt2010.05qtlib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4

    mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Release all

    mingw32-make[1]: Entering directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"......includeQtCore" -I"......includeQtGui" -I"......include" -I"......includeActiveQt" -I"tmpmocrelease_shared" -I"..appchooser" -I"." -I"......mkspecswin32-g++" -o tmpobjrelease_sharedmain.o ..appchoosermain.cpp

    ..appchoosermain.cpp:157:20: error: main.moc: No such file or directory

    mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    mingw32-make: Leaving directory `C:/Qt/2010.05/qt/examples/animation/appchooser-build-desktop'

    mingw32-make[1]: *** [tmp/obj/release_shared/main.o] Error 1

    mingw32-make: *** [release-all] Error 2

    The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
    Error while building project appchooser (target: Desktop)
    When executing build step 'Make'

    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    So Forum friends, what am I missing? No doubt a common green be error but I still like to learn and most likely others will also learn from your advices.

    /Mike


  • Moderators

    Do you have the log with the backslashes in place? It is kind of hard to read without them.

    This should work... you could try to do a non-shadow build (aka. run qmake inside the source directory). It Qt Creator you do that by going into project mode and unticking the shadow build checkbox in the build settings.



  • Thanks Tobias!

    Removing the Shadow-build check in the Projects Building Settings for Release and Debug made the trick.

    I have tried three different Examples and they all run fine.

    /Mike

    PS. Sorry folr the missing back slashes. They got lost somewhare between copying the Compiler output to the pais into this forum. Possible the forum security does not alow them to prevent execution of mallisious code through this web site? DS.


Log in to reply
 

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