Got a head scratcher. I want my program compiled w/ the -g debugging flag to valgrind won't be so damn cryptic. Can't figure it out though... any help?
Got a head scratcher. I want my program compiled w/ the -g debugging flag to valgrind won't be so damn cryptic. Can't figure it out though... any help?
Run QtAssistant, on Index tab type "qmake" and then click twice on "qmake Variable Reference" and look for a variable suitable for you, but anyway, I think that qmake adds -g in debug on Linux but I'm not sure.
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
Apparently my QtAssistant as fubar as it's looking /usr/doc/qt/3. I can see the reference here which I assume is the same. I messed around with QMAKE_CXXFLAGS_DEBUG but got nothing so far.
-g should be added automatically by qmake for both debug and release builds, as far as I remember. But valgrind tends to be criptic regardless of the -g flag. Maybe you should change the params you run valgrind with? And think about adding a "-ggdb" option instead of pure "-g".
Hi,
For pass parameters for the gcc you should use some special variables for this, as QMAKE_CXXFLAGS.
Access in your QtAssistance this URL qthelp://com.trolltech.qmake.453/qdoc/qmake-manual.html. (if you are using this version)
or type qmake inside 'Search for' field and select QMake Manual
Add this variables inside you .pro file like this:
unix : QMAKE_CXXFLAGS = -g
if you are using Window$ native ou *unix native plataform the prefix unix: ou win32: isn't necessary.
Hey Guys: Sorry for the late reply.
>> vcp
That's the one -- I've got the -g in in there now. Thanks a mil.
>>wysota
Indeed, it is, but w/ -g it should give me more info. Line numbers, specifically, which is crucial for large projects.
Thanks again.
Bookmarks