Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.5 not working in Debug mode
QtWS25 Last Chance

Qt 5.5 not working in Debug mode

Scheduled Pinned Locked Moved Installation and Deployment
windows 7 64 bidebug and relea
9 Posts 2 Posters 4.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jcga
    wrote on 15 Jul 2015, 15:50 last edited by jcga
    #1

    Hi,

    I have just moved from Qt 5.2 to Qt 5.5 on a Windows 7 Pro 64bits machine using MinGw 4.9.2 and have a strange problem: My programs do not execute on debug mode, but do in release mode. To test that, I wrote this simple console app:

    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
    
        puts("Test");
    
        return a.exec();
    }```
    
    When I set the debug mode and press the Run button, I get on the console window "press <RETURN> to close this window". But if I set the release mode I get "Test", as it should be. If I set the debug mode and press the "start debugging" button, I get an error message "cannot continue debugging process: The program is not being run".
    
    Any help is welcome.
    
    Jean-Claude
    1 Reply Last reply
    0
    • P Offline
      P Offline
      Paul H.
      wrote on 15 Jul 2015, 17:24 last edited by
      #2

      Did you use the distributed Qt binaries or build your own? Your program works as expected in both debug and release builds on my system with the distributed binaries.
      Paul

      J 1 Reply Last reply 15 Jul 2015, 18:31
      0
      • P Paul H.
        15 Jul 2015, 17:24

        Did you use the distributed Qt binaries or build your own? Your program works as expected in both debug and release builds on my system with the distributed binaries.
        Paul

        J Offline
        J Offline
        jcga
        wrote on 15 Jul 2015, 18:31 last edited by
        #3

        @Paul-H.
        Thanks for you answer. I used distributed binaries, specifically 'qt-unified-windows-x86-2.0.2-1-online.exe'. I shall probably try to reinstall?
        JC

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Paul H.
          wrote on 15 Jul 2015, 20:13 last edited by
          #4

          You can certainly give that a try. If you clean the project and rebuild (in debug), what kind of messages are you getting in Compile Output or Issues?
          Paul

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jcga
            wrote on 16 Jul 2015, 12:24 last edited by jcga
            #5

            I tried. I uninstall, clean registry and reinstall Qt, with the same result. Then I added the Qt 5.2.1 module to the installation, and debug works if the project is configured with this version, but not with 5.5.0 or 5.4.2 version. I don't know if the information is relevant or not, but the 5.5.0 and the 5.4.2 versions compile with MinGW 4.9 whereas the 5.2.1 compliles with MinGW 4.8.

            With Qt 5.5.0 in debug mode:
            **The console window displays **
            Press <RETURN> to close this window...
            the compile window displays:
            14:22:25: Running steps for project test...
            14:22:25: Configuration unchanged, skipping qmake step.
            14:22:25: Starting: "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe"
            C:/Qt/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
            mingw32-make[1]: Entering directory 'D:/Users/Files/JCG/Programmation/Projets Qt/build-test-Desktop_Qt_5_5_0_MinGW_32bit-Debug'
            mingw32-make[1]: Nothing to be done for 'first'.
            mingw32-make[1]: Leaving directory 'D:/Users/Files/JCG/Programmation/Projets Qt/build-test-Desktop_Qt_5_5_0_MinGW_32bit-Debug'
            14:22:26: The process "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" exited normally.
            14:22:26: Elapsed time: 00:01.
            and the Application output window displays:
            Starting D:\Users\Files\JCG\Programmation\Projets Qt\build-test-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug\test.exe...
            D:\Users\Files\JCG\Programmation\Projets Qt\build-test-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug\test.exe exited with code -1073741511

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Paul H.
              wrote on 16 Jul 2015, 14:30 last edited by
              #6

              I don't think it is the compiler, since it works on my system with 4.9.2. However, the compile output you posted was not run after "Clean". You should see the g++ compile and link commands. For instance, here are the compiler commands when I build it:

              • g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_CORE_LIB -I..\forumTest -I. -I..\..\..\Qt\5.5\mingw492_32_opengl_icu_ssl\include -I..\..\..\Qt\5.5\mingw492_32_opengl_icu_ssl\include\QtCore -Idebug -I..\..\..\Qt\5.5\mingw492_32_opengl_icu_ssl\mkspecs\win32-g++ -o debug\main.o ..\forumTest\main.cpp

              • g++ -Wl,-subsystem,console -mthreads -o debug\forumTest.exe debug/main.o -LG:/Qt/5.5/mingw492_32_opengl_icu_ssl/lib -lQt5Cored

              You may want to run qmake after cleaning, as well.
              Paul

              J 1 Reply Last reply 17 Jul 2015, 16:37
              0
              • P Paul H.
                16 Jul 2015, 14:30

                I don't think it is the compiler, since it works on my system with 4.9.2. However, the compile output you posted was not run after "Clean". You should see the g++ compile and link commands. For instance, here are the compiler commands when I build it:

                • g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_CORE_LIB -I..\forumTest -I. -I..\..\..\Qt\5.5\mingw492_32_opengl_icu_ssl\include -I..\..\..\Qt\5.5\mingw492_32_opengl_icu_ssl\include\QtCore -Idebug -I..\..\..\Qt\5.5\mingw492_32_opengl_icu_ssl\mkspecs\win32-g++ -o debug\main.o ..\forumTest\main.cpp

                • g++ -Wl,-subsystem,console -mthreads -o debug\forumTest.exe debug/main.o -LG:/Qt/5.5/mingw492_32_opengl_icu_ssl/lib -lQt5Cored

                You may want to run qmake after cleaning, as well.
                Paul

                J Offline
                J Offline
                jcga
                wrote on 17 Jul 2015, 16:37 last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jcga
                  wrote on 21 Jul 2015, 13:25 last edited by jcga
                  #8

                  I think I finally understood the problem. Wthi the previous version of Qt (5.2), in order to run my programs outside QtCreator, I copied dlls like "Qt5Core*" from Qt/5.2/mingwxx_32/bin to windows/system (apparently, the installatiion of Qt doesn't do so). When I installed the version 5.5, these dlls present in windows/system apparently "screened" the dlls in Qt/5.5/mingwxx_32/bin, which correspond to Qt 5.2 and not to Qt5.5. I suppressed the dlls in windows/system, and the debug mode is now working.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    Paul H.
                    wrote on 21 Jul 2015, 14:01 last edited by
                    #9

                    I'm glad you got it working. For the future, I wouldn't recommend copying the dlls to the windows system directory. Check out this page for deploying on windows. In particular check out The Windows Deployment Tool section.

                    Paul

                    1 Reply Last reply
                    0

                    9/9

                    21 Jul 2015, 14:01

                    • Login

                    • Login or register to search.
                    9 out of 9
                    • First post
                      9/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved