How to build pdb for release version of Qt?

In order to build .pdb files for the release version of Qt, simply add the required compiler parameter in the mkspec you use. For example for MSVC 2005, you’d modify \mkspecs\win32-msvc2005\qmake.conf and add the -zi flag to QMAKE_CFLAGS_RELEASE and the /DEBUG flag to QMAKE_LFLAGS_RELEASE, e.g

  1. QMAKE_CFLAGS_RELEASE    = -O2 -MD -zi

and

  1. QMAKE_LFLAGS_RELEASE    = /INCREMENTAL:NO /DEBUG

Now the compiler will create debug information and the linker will use it while linking.

No comments

Write a comment

Sorry, you must be logged in to post a comment.