Qt World Summit: Submit your Presentation

Odd compilation bugs

  • Hi,
    I've got some strange problems with one of my Qt projects (it's called gen1). The problem is that Qt Creator doesn't compile it, unless I manually delete the build folder of this project. If I don't, I get this error:
    @[debug\gen1.exe] Error 1

    mingw32-make[1]: *** [debug\gen1.exe] Error 1
    mingw32-make: *** [debug] Error 2@

    Moreover, if there's a bug in the code, instead of showing me where the problem is, I get this error:
    @[debug/mainwindow.o] Error 1

    mingw32-make[1]: *** [debug/mainwindow.o] Error 1
    mingw32-make: *** [debug] Error 2@

    The problem exists only in this single project. I've tried to make a new project and after copying the code and I've tried to reinstall Qt but it didn't solve my problem.

    Here's some info:
    Qt Creator 2.3.0
    Qt 4.7.4
    Windows 7 64-bit

    Here's the content of gen1.pro:
    @QT += core gui

    TARGET = gen1
    TEMPLATE = app

    SOURCES += main.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui@

    Any help is greatly appreciated.

  • What is the actual error? That usually happens before the text you posted.

  • The problem is that actually there are no errors:
    @Uruchamianie kroków budowania dla projektu gen1...
    Konfiguracja niezmieniona, krok qmake opuszczony.
    Uruchamianie "C:\QtSDK\mingw\bin\mingw32-make.exe"
    C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory D:/stud/modelowanie i symulacja/1/gen1-build-desktop-debug' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\gen1" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\mainwindow.o ..\gen1\mainwindow.cpp mingw32-make[1]: Leaving directoryD:/stud/modelowanie i symulacja/1/gen1-build-desktop-debug'
    mingw32-make[1]: *** [debug/mainwindow.o] Error 1
    mingw32-make: *** [debug] Error 2@

  • There is a known issue with using directories with spaces embedded in them. The problem arises because of the directory "D:/stud/modelowanie i symulacja". If you move your project to a different (non-spaced) directory, it should work properly.

  • Thank you for the advice, but unfortunately it didn't work. I've created a new project in d:/gen1/ and I still get the same errors.

    I forgot to add that on Linux the compilation works fine.

Log in to reply