Qt debug with release
I am trying to debug a program I made with Qt 4.7.3 in Rele开发者_开发知识库ase mode. I would like to debug into this program. Is there a way to build the Qt DLL libraries in release with debug info?
I'm on Windows using Visual Studios 2008.
To generate debug symbols for your release build of Qt on windows...
- Add the flag "-Zi" to QMAKE_CFLAGS_RELEASE in your qmake.conf.
- Add the flag "/DEBUG" to QMAKE_LFLAGS_RELEASE in your qmake.conf (you'll probably also want "/OPT:REF" and "/OPT:icf")
For a VC2008 build you would add this to Qt\mkspecs\win32-msvc2008\qmake.conf Then configure and rebuild.
More details of the various qmake options available here: http://doc.qt.io/qt-5/qmake-variable-reference.html
精彩评论