开发者

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...

  1. Add the flag "-Zi" to QMAKE_CFLAGS_RELEASE in your qmake.conf.
  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜