PDA

View Full Version : How to build in debug mode?



Weilor
13th February 2006, 08:55
Hi all,

how can I build my application in debug mode and look at the output of the debugger? I use Qt 4.1, Suse Linux 9.3, gcc and gdb.

Thanks a lot,
Weilor

Everall
13th February 2006, 09:23
What is in your pro file already?

CONFIG should have debug and console options
if they are not set already add them in your pro file like this :
CONFIG += console

Cheers

Cesar
13th February 2006, 10:06
I thinks it's obvious, but nevertheless...
QT should be compiled with either -debug or -debug-and-release

wysota
13th February 2006, 10:46
To build your application in debug mode, add "CONFIG += debug" to your project file and rerun qmake.

Weilor
14th February 2006, 09:14
To build your application in debug mode, add "CONFIG += debug" to your project file and rerun qmake

Thats an answer every newbie understands. Thanks!

chaimar
15th February 2006, 14:02
I had the same problem, but I'm running under Microsoft Visual Studio .Net 2003. I tried to add "CONFIG += debug" to my project file and reran qmake, but nothing happened.
I compared the project-settings under .Net with a friend that had a project which worked under debug. I made the same changes, but still nothing happened.
We then compared the project-file from .Net, with the extension vcproj, and then I saw that there were added a debug-section under the release-section under configuration.
But I was missing two lines(don't know why, we made the projects the same way).
Under the configuration-paragraph for debug, and the third <Tool>-paragraph I added these two lines:

GenerateDebugInformation="TRUE"

OptimizeReferences="1"
as number 7 and 10 in that paragraph(probably not important).

Voila, it worked:)

Strange that these lines didn't add up when I ran qmake. I have no explanation of what happened, but I will look in to it.

Cheers