PDA

View Full Version : Debugging in Windows



Doug Broadwell
29th November 2006, 00:21
I'm running 4.1.1 in windows compiled by the minGW tools. I'm using Cygwin's gdb to try to debug a crashing program but it says there are no symbols in the file.

How do I enable keeping the symbol table in the executable in this environment?

Thanks

jacek
29th November 2006, 00:40
Add CONFIG += debug to your .pro file and recompile your application or try compiling your application using Makefile.debug (qmake should create it by default under windows).

Doug Broadwell
29th November 2006, 00:48
I get the following error when I add "CONFIG += debug" to my .pro file:

g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -o "debug\n1.exe" debug\bl.o d
ebug\comm.o debug\main.o debug\MainWindow.o debug\qextserialbase.o debug\qextserialport.o debug\win_qextserialport.o debug\moc_MainWindow.o -L"C:\Dat
a\Qt\4.1.1\lib" -lQtGuid4 -lQtCored4
C:\Data\Qt\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\. .\..\..\mingw32\bin\ld.exe: cannot find -lQtGuid4

Thanks.

jacek
29th November 2006, 00:52
C:\Data\Qt\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\. .\..\..\mingw32\bin\ld.exe: cannot find -lQtGuid4
You don't have the debug versions of Qt libraries. You can build them by hand or using a link in Start -> Programs -> Qt ... -> Build debug libraries (or something similar).

Doug Broadwell
29th November 2006, 01:58
Thanks, that fixed it!

Doug