Results 1 to 7 of 7

Thread: Qt Creator only builds the Release version!

  1. #1
    Join Date
    Jan 2010
    Posts
    4
    Qt products
    Qt4

    Question Qt Creator only builds the Release version!

    Installation: Qt 4.6.0 (Mingw) built Nov 27 2009 (LGPL)

    I installed it, did the tutorial for TextFinder and I am having some real build issues.

    The default build configuration is Debug. The build is green but when Qt Creator tries to run the TextFinder app I get...
    Qt Code:
    1. Starting H:\Cookbook\qt\text_finder\debug\text_finder.exe...
    2. The process could not be started!
    To copy to clipboard, switch view to plain text mode 

    Looking at the actual directory, I find that the \debug directory is empty but that there is a text_finder.exe in the \release directory. Running that .exe yields an error message box - "text_finder.exe - Entry Point Not Found"...
    Qt Code:
    1. The procedure entry poin _Z21qRegisterResourceDataiPKhS0_S0_ could not be located in the dynamic link library QtCore4.dll
    To copy to clipboard, switch view to plain text mode 

    So, I switched the build configuration to Release, and everything builds and runs just fine.

    Switching back to Debug and examining the compile output reveals that even though I have selected the debug configuration the Makefile.release is still being used to build the project, here is the output of a rebuild with the Debug configuration...
    Qt Code:
    1. Running build steps for project text_finder...
    2. Starting: C:/Qt/2009.05/mingw/bin/mingw32-make.exe clean -w
    3. mingw32-make: Entering directory `H:/Cookbook/qt/text_finder'
    4. C:/Qt/2009.05/mingw/bin/mingw32-make -f Makefile.Release clean
    5. mingw32-make[1]: Entering directory `H:/Cookbook/qt/text_finder'
    6. rm tmp/moc/release_shared/moc_textfinder.cpp
    7. rm release/qrc_textfinder.cpp
    8. rm ui_textfinder.h
    9. rm tmp/obj/release_shared/main.o tmp/obj/release_shared/textfinder.o tmp/obj/release_shared/moc_textfinder.o tmp/obj/release_shared/qrc_textfinder.o
    10. mingw32-make[1]: Leaving directory `H:/Cookbook/qt/text_finder'
    11. C:/Qt/2009.05/mingw/bin/mingw32-make -f Makefile.Debug clean
    12. mingw32-make[1]: Entering directory `H:/Cookbook/qt/text_finder'
    13. rm tmp/moc/debug_shared/moc_textfinder.cpp
    14. rm debug/qrc_textfinder.cpp
    15. rm ui_textfinder.h
    16. rm: cannot remove `ui_textfinder.h': No such file or directory
    17. rm tmp/obj/debug_shared/main.o tmp/obj/debug_shared/textfinder.o tmp/obj/debug_shared/moc_textfinder.o tmp/obj/debug_shared/qrc_textfinder.o
    18. mingw32-make[1]: [compiler_uic_clean] Error 1 (ignored)
    19. mingw32-make[1]: Leaving directory `H:/Cookbook/qt/text_finder'
    20. mingw32-make: Leaving directory `H:/Cookbook/qt/text_finder'
    21. Exited with code 0.
    22. Configuration unchanged, skipping QMake step.
    23. Starting: C:/Qt/2009.05/mingw/bin/mingw32-make.exe -w
    24. mingw32-make: Entering directory `H:/Cookbook/qt/text_finder'
    25. C:/Qt/2009.05/mingw/bin/mingw32-make -f Makefile.Release
    26. mingw32-make[1]: Entering directory `H:/Cookbook/qt/text_finder'
    27. c:/Qt/2009.05/qt/bin/uic.exe textfinder.ui -o ui_textfinder.h
    28. g++ -c -O2 -Wall -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I'c:/Qt/2009.05/qt/include/QtCore' -I'c:/Qt/2009.05/qt/include/QtGui' -I'c:/Qt/2009.05/qt/include' -I'c:/Qt/2009.05/qt/include/ActiveQt' -I'tmp/moc/release_shared' -I'.' -I'c:/Qt/2009.05/qt/mkspecs/win32-g++' -o tmp/obj/release_shared/main.o main.cpp
    29. g++ -c -O2 -Wall -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I'c:/Qt/2009.05/qt/include/QtCore' -I'c:/Qt/2009.05/qt/include/QtGui' -I'c:/Qt/2009.05/qt/include' -I'c:/Qt/2009.05/qt/include/ActiveQt' -I'tmp/moc/release_shared' -I'.' -I'c:/Qt/2009.05/qt/mkspecs/win32-g++' -o tmp/obj/release_shared/textfinder.o textfinder.cpp
    30. C:/Qt/2009.05/qt/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I'c:/Qt/2009.05/qt/include/QtCore' -I'c:/Qt/2009.05/qt/include/QtGui' -I'c:/Qt/2009.05/qt/include' -I'c:/Qt/2009.05/qt/include/ActiveQt' -I'tmp/moc/release_shared' -I'.' -I'c:/Qt/2009.05/qt/mkspecs/win32-g++' -D__GNUC__ -DWIN32 textfinder.h -o tmp/moc/release_shared/moc_textfinder.cpp
    31. g++ -c -O2 -Wall -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I'c:/Qt/2009.05/qt/include/QtCore' -I'c:/Qt/2009.05/qt/include/QtGui' -I'c:/Qt/2009.05/qt/include' -I'c:/Qt/2009.05/qt/include/ActiveQt' -I'tmp/moc/release_shared' -I'.' -I'c:/Qt/2009.05/qt/mkspecs/win32-g++' -o tmp/obj/release_shared/moc_textfinder.o tmp/moc/release_shared/moc_textfinder.cpp
    32. c:/Qt/2009.05/qt/bin/rcc.exe -name textfinder textfinder.qrc -o release/qrc_textfinder.cpp
    33. g++ -c -O2 -Wall -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I'c:/Qt/2009.05/qt/include/QtCore' -I'c:/Qt/2009.05/qt/include/QtGui' -I'c:/Qt/2009.05/qt/include' -I'c:/Qt/2009.05/qt/include/ActiveQt' -I'tmp/moc/release_shared' -I'.' -I'c:/Qt/2009.05/qt/mkspecs/win32-g++' -o tmp/obj/release_shared/qrc_textfinder.o release/qrc_textfinder.cpp
    34. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows -o release/text_finder.exe tmp/obj/release_shared/main.o tmp/obj/release_shared/textfinder.o tmp/obj/release_shared/moc_textfinder.o tmp/obj/release_shared/qrc_textfinder.o -L'h:/cookbook/Qt/lib' -L'c:/Qt/2009.05/qt/lib' -lmingw32 -lqtmain -lQtGui4 -lQtCore4
    35. mingw32-make[1]: Leaving directory `H:/Cookbook/qt/text_finder'
    36. mingw32-make: Leaving directory `H:/Cookbook/qt/text_finder'
    37. Exited with code 0.
    To copy to clipboard, switch view to plain text mode 

    I have other, commercial, installations of Qt installed (and usually have no problems with them but they are for VS2005), I also already have Mingw and Msys already installed and on my path.

    Any ideas?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt Creator only builds the Release version!

    Do you have debug versions of Qt libraries (they should have a "d" character appended to their name)?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2010
    Posts
    4
    Qt products
    Qt4

    Default Re: Qt Creator only builds the Release version!

    I think so, the DLLs look like this...

    ./qt/bin/QtCore4.dll
    ./qt/bin/QtCored4.dll
    ./qt/bin/QtGui4.dll
    ./qt/bin/QtGuid4.dll
    etc...

    So, I assume that those with the extra 'd' are the debug versions.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt Creator only builds the Release version!

    Create a (new) minimal project containing only the main() function and see if you can build it in release mode.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2010
    Posts
    4
    Qt products
    Qt4

    Default Re: Qt Creator only builds the Release version!

    Created a minimalist 'Hello World' main.cpp - same issue. However, I can build from the command line with "make release" or "make debug" and that works fine.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt Creator only builds the Release version!

    Please post your qmake project file of the minimal example.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jan 2010
    Posts
    4
    Qt products
    Qt4

    Default Re: Qt Creator only builds the Release version!

    I have attached a tar.gz of the project, plus the generated makefiles.

    -Verse
    Attached Files Attached Files

Similar Threads

  1. Replies: 0
    Last Post: 15th November 2009, 09:40
  2. Replies: 0
    Last Post: 11th August 2009, 09:38
  3. Replies: 5
    Last Post: 5th October 2008, 05:12
  4. Replies: 6
    Last Post: 10th November 2006, 10:38
  5. Problem with Release version
    By jlbrd in forum Installation and Deployment
    Replies: 7
    Last Post: 30th March 2006, 19:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.