Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT debugger problem
QtWS25 Last Chance

QT debugger problem

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 5 Posters 14.1k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    You can't mix and match debuggers and compilers. If you want to use the MinGW debugger then install the Qt for MinGW package.

    If you want to debug your MSVC version, you'll have to grab the debugger from Microsoft's website. Yes, it's a separate download, the debugger from Visual Studio only works within Visual Studio.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • AsimovA Offline
      AsimovA Offline
      Asimov
      wrote on last edited by
      #3

      @SGaist
      Good news is that I have just solved it.

      Here are the steps I did.
      I downloaded winsdksetup.exe for windows 10
      installed and then rebooted and run qt

      In tools/options/kits

      I clicked on the one with the exclamation mark
      Then clicked on the dropdown next to debugger and selected autodetect cdb, and now it works.

      By the way I looked for qt with mingw on the qt site, and it asks you a pile of questions about open source and then it gives you the microsoft open source version whatever you choose. There does not seem to be another version of qt there at all.

      1 Reply Last reply
      0
      • AsimovA Offline
        AsimovA Offline
        Asimov
        wrote on last edited by
        #4

        Well I thought I solved it, but another problem has just happened.
        Now I am getting this error on compile.
        :-1: error: LNK1158: cannot run 'rc.exe'

        So I found some help on stack overflow and it said to copy the rc.exe and rcdll.dll to the microsoft visual studio/VC directory.

        I did this and it still isn't working, so now I can't even compile anything which is really annoying.

        Can anyone give me the link for QT and mingw because every time I download off the main site it only gives me the msvc version.

        I have been to about 20 webpages looking for an answer, and I have copied these files, but still I cannot compile.
        At least before installing cdb I could compile.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #5

          If you are using the online installer, then just select the Qt MinGW version as well as MinGW to have everything you need installed.

          If you are using the offline installer, select the one that contains MinGW in its name in this page.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • AsimovA Offline
            AsimovA Offline
            Asimov
            wrote on last edited by Asimov
            #6

            @SGaist

            Thanks I am downloading the offline installer of QT and mingw compiler.
            Strange it is only a 32bit version, but at least my app will be backward compatible with 32bit systems.
            I wonder how they managed to hide this page from me this long LOL.

            Will let you know how it goes.

            1 Reply Last reply
            0
            • AsimovA Offline
              AsimovA Offline
              Asimov
              wrote on last edited by Asimov
              #7

              That did the trick. It now compiles and the debugger works for a change woo hoo thanks

              PS. since compiling but there is a problem that wasn't there before
              I am using

              QDir databasePath; 
              QString path = databasePath.currentPath()+"/database";
              

              Which is supposed to put me in the exe folder, but it is ending up iin username/documents instead
              This worked fine before. Hope it isn't a bug in mingw. Looking for a solution now.

              PPS. I have found a solution, but I don't know why my old code which worked before is now not working. There must be differences in the compiler. Anyway this new line works.

              QString path = qApp->applicationDirPath()+"/database";
              
              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Not necessarily however, currentPath doesn't mean application executable path, it's the current working directory which might be different.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  AliShug
                  wrote on last edited by
                  #9

                  I had the same linking error as @Asimov and managed to get it working with MSVC 64-bit. You need to make rc.exe and rcdll.dll available to the compiler, but since it's a 64-bit project this means using the 64-bit versions and putting them in the right spot.

                  For Visual Studio 14 (2015) and Windows kit 8.1, that means copying rc.exe and rcdll.dll from:
                  C:\Program Files (x86)\Windows Kits\8.1\bin\x64
                  To:
                  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64

                  M 1 Reply Last reply
                  2
                  • A AliShug

                    I had the same linking error as @Asimov and managed to get it working with MSVC 64-bit. You need to make rc.exe and rcdll.dll available to the compiler, but since it's a 64-bit project this means using the 64-bit versions and putting them in the right spot.

                    For Visual Studio 14 (2015) and Windows kit 8.1, that means copying rc.exe and rcdll.dll from:
                    C:\Program Files (x86)\Windows Kits\8.1\bin\x64
                    To:
                    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64

                    M Offline
                    M Offline
                    MokJ
                    wrote on last edited by MokJ
                    #10

                    @AliShug No it isn't allowing me to copy those files.... Having the same trouble in one of my computers.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      Gilad Reich
                      wrote on last edited by
                      #11

                      I know this is an old post, but I'll just share my solution here.

                      Adding to the PATH environment variable this(depending on the windows kit that you're using):
                      C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86

                      Or you can do as @AliShug suggested:
                      Copying these 2 files: rc.exe and rcdll.dll.
                      From:
                      C:\Program Files (x86)\Windows Kits\8.1\bin\x86
                      or
                      C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86

                      Into:
                      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86

                      1 Reply Last reply
                      0

                      • Login

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