Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Please help me get started with debugging in Qt Creator

    Tools
    3
    8
    1513
    Loading More Posts
    • 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.
    • B
      BasicPoke last edited by

      Can someone please help me get started with debugging in Qt Creator. My compiler is MinGW 4.8 32bit. In Options > Build & Run, Debugger tab it says "Extracted from Kit Desktop Qt 5.2.1 MinGW 32bit C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\gdb.exe.

      When I add a breakpoint, there is an hourglass next to it. When I "Start Debugging" the hourglass goes away. Execution does not stop on my breakpoints. What is my problem?

      Thanks a lot
      Ron

      1 Reply Last reply Reply Quote 0
      • A
        Asperamanca last edited by

        Have you built your application in Debug mode?

        1 Reply Last reply Reply Quote 0
        • B
          BasicPoke last edited by

          On the left side of the screen, I changed from Release to Debug, then clicked Compile, and I get the error: cannot find -lcbw32d

          This is trying to use the debug version of a library that I installed. There is no debug version. I looked back on an answer from SGaist where he said "If you only have a release library, remove the line from the pro file that tries to link to the debug version." I did this but no change.

          How do I get rid of this error?
          Is there not any way to look at the libraries you have already added? Do you just have to look in the .pro file?

          Thanks
          Ron

          1 Reply Last reply Reply Quote 0
          • A
            andreyc last edited by

            Could you show did you add cbw32 to .pro file.

            1 Reply Last reply Reply Quote 0
            • B
              BasicPoke last edited by

              Not sure what you are asking, andreyc, but here is what I have in the .pro file:

              @#---Following added when DAQ library was added---
              win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../DAQ_C/ -lcbw32
              #else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../DAQ_C/ -lcbw32d

              INCLUDEPATH += $$PWD/../DAQ_C
              DEPENDPATH += $$PWD/../DAQ_C
              #------------------------------------------------
              @
              Ron

              1 Reply Last reply Reply Quote 0
              • A
                Asperamanca last edited by

                If you only have a release version of that library, I would just write
                @ LIBS += -L$$PWD/../DAQ_C/ -lcbw32@

                1 Reply Last reply Reply Quote 0
                • B
                  BasicPoke last edited by

                  I got it working now. I think my main problem was that in Projects mode -> Build Settings -> Debug, I had a Build directory that was invalid. I set my build directories for Release & Debug to folders outside of my project folder (I don't like this), i.e. "build-GaugeMon-Desktop_Qt_5_2_1_MinGW_32bit-Debug" and checked the Shadow build checkbox.

                  Thanks for your help.
                  Ron

                  1 Reply Last reply Reply Quote 0
                  • B
                    BasicPoke last edited by

                    I ended up having to use Asperamanca's line for the library, in the .pro file:
                    @LIBS += -L$$PWD/../DAQ_C/ -lcbw32@

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post