Please help me get started with debugging in Qt Creator
-
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 -
Have you built your application in Debug mode?
-
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 -
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/ -lcbw32dINCLUDEPATH += $$PWD/../DAQ_C
DEPENDPATH += $$PWD/../DAQ_C
#------------------------------------------------
@
Ron -
If you only have a release version of that library, I would just write
@ LIBS += -L$$PWD/../DAQ_C/ -lcbw32@ -
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