HowTo build Qt5 with correctly distributed release pdb files

3k Views Asked by At

I'd like to build Qt5 from sources with PDB files in debug and release mode, but I faced with two problems:

  1. no release PDB files generated (here is the solution),

  2. qt build system didn't deploy release PDB files to given prefix build folder as it does for the debug version after nmake.exe install.

Here is example:

> configure -confirm-license -debug-and-release -opensource -shared -platform win32-msvc2008 -prefix x86 -mp -no-opengl -nomake examples
> nmake.exe
> nmake.exe install

After building finished I had qtbase\bin\x86\x86\bin folder with DLLs, LIBs and only debug PDB files, except release PDB files. Qt build scripts didn't make a copy of release PDB files, as it does for debug PDB files. Release PDB files created, and located in there modules.

Did any one know how to fix this?

PS: As my own solution, I thought to copy all *.pdb files from each module folder, but I think that this case is the worst, and first I'll try to find more human solution.

PSS: Qt4 didn't have such behavior, and we don't have problems.

P3S: Here is Qt similar bug.

Thanks, best regards!


Environment:

Version: Qt 5.4.1

System: Win 8.1

Toolset: MSVS2008 (vc9)


Usefull links:

  1. qmake Variable Reference
  2. How to create .pdb files also for Release version of Qt library
  3. SO
2

There are 2 best solutions below

0
On BEST ANSWER

Solved with -force-debug-info damn option...

0
On

Qt.io - release with pdb

append (not insert at file beginning):

QMAKE_CFLAGS_RELEASE    = -O2 -MD -zi
QMAKE_LFLAGS_RELEASE    = /INCREMENTAL:NO /DEBUG

into qmake.conf, then you will get release pdbs