This is a bug.
--
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Try to use this patch and tell me if it works for you:
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index ae139c2..41bec4c 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -409,14 +409,21 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_DISTCLEAN").append(tgt + ".lib");
}
if (project->isActiveConfig("debug_info")) {
- // Add the compiler's PDB file.
- QString pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ QString pdbfile;
+ QString distPdbFile = tgt + ".pdb";
+ if (project->isActiveConfig("staticlib")) {
+ // For static libraries, the compiler's pdb file and the dist pdb file are the same.
+ pdbfile = distPdbFile;
+ } else {
+ // Use $${TARGET}.vc.pdb in the OBJECTS_DIR for the compiler and
+ // $${TARGET}.pdb (the default) for the linker.
+ pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ }
QString escapedPdbFile = escapeFilePath(pdbfile);
project->values("QMAKE_CFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CXXFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CLEAN").append(pdbfile);
- // Add the linker's PDB file to the distclean target.
- project->values("QMAKE_DISTCLEAN").append(tgt + ".pdb");
+ project->values("QMAKE_DISTCLEAN").append(distPdbFile);
}
if (project->isActiveConfig("debug")) {
project->values("QMAKE_CLEAN").append(tgt + ".ilk");
index ae139c2..41bec4c 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -409,14 +409,21 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_DISTCLEAN").append(tgt + ".lib");
}
if (project->isActiveConfig("debug_info")) {
- // Add the compiler's PDB file.
- QString pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ QString pdbfile;
+ QString distPdbFile = tgt + ".pdb";
+ if (project->isActiveConfig("staticlib")) {
+ // For static libraries, the compiler's pdb file and the dist pdb file are the same.
+ pdbfile = distPdbFile;
+ } else {
+ // Use $${TARGET}.vc.pdb in the OBJECTS_DIR for the compiler and
+ // $${TARGET}.pdb (the default) for the linker.
+ pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ }
QString escapedPdbFile = escapeFilePath(pdbfile);
project->values("QMAKE_CFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CXXFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CLEAN").append(pdbfile);
- // Add the linker's PDB file to the distclean target.
- project->values("QMAKE_DISTCLEAN").append(tgt + ".pdb");
+ project->values("QMAKE_DISTCLEAN").append(distPdbFile);
}
if (project->isActiveConfig("debug")) {
project->values("QMAKE_CLEAN").append(tgt + ".ilk");
Regards,
Gunnar Roth
Gesendet: Montag, 05. Dezember 2016 um 17:50 Uhr
Von: "Rainer Wiesenfarth" <rainer_wiesenfa...@trimble.com>
An: interest <interest@qt-project.org>
Betreff: [Interest] Qt 5.6.2 Git on Windows: -force-debug-info configure option triggers linker warning on usage
Von: "Rainer Wiesenfarth" <rainer_wiesenfa...@trimble.com>
An: interest <interest@qt-project.org>
Betreff: [Interest] Qt 5.6.2 Git on Windows: -force-debug-info configure option triggers linker warning on usage
I checked out Qt 5.6.2 from the git repository and configured it with
..\configure -prefix "%DESTINATION_DIR%" -release -force-debug-info [...]
Qt configures, builds and installs ok, but when using the result in a project, I get this linker warning for every executable using Qt:
qtmain.lib(qtmain_win.obj) : warning LNK4099: PDB 'qtmain.vc.pdb' was not found with 'qtmain.lib(qtmain_win.obj)' or at 'L:\SVN_Work\source\mb\BIN\Release_x64\qtmain.vc.pdb'; linking object as if no debug info
I found the file in (builddir)\qtbase\src\winmain\.obj\release but it does not get copied to the installation directory.
Is this a bug / missing feature of the Qt build process or am I doing things wrong?
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/
Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/
Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest