I am using Qt 4.2 Free Version (version setup). When I add "CONFIG += debug" in .pro file. When I qmake, make, it have errors:
D:\Compiler\MinGW\ld.exe: cannot find -lQtGuid4
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\mythread.exe] Error 1
mingw32-make[1]: Leaving directory `D:/Projects/Qt/mythread'
mingw32-make: *** [debug] Error 2
D:\Compiler\MinGW\ld.exe: cannot find -lQtGuid4
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\mythread.exe] Error 1
mingw32-make[1]: Leaving directory `D:/Projects/Qt/mythread'
mingw32-make: *** [debug] Error 2
To copy to clipboard, switch view to plain text mode
I think only Qt Commercial force using debug option. That's right?
Qt can't "throw" a segmentation fault error, because it is the system that aborts the process, so Qt could only call abort() here. Instead Qt calls its handler which outputs a warning and then aborts the process. You can easily debug such situation in gdb - simply display the backtrace and look where is the error handler called - it'll be called from within QList::index or something simmilar. Then look further in the call list, the first entry not related to QtCore will be a position in your code which triggered the warning.
Suppose my program have error & output error: "index out of range". Can you guide me clearly how to use backtrace?
Bookmarks