Opened 6 years ago

Closed 6 years ago

#310 closed defect (fixed)

Debug build configuration looks for nonexistent libraries

Reported by: Alex Taylor Owned by:
Priority: major Milestone: Qt Enhanced
Component: General Version: 4.7.3
Severity: medium Keywords: debug lib
Cc:

Description

Switching a Qt4 project to debug mode with

CONFIG += debug console

causes build to fail with the error message

weakld: cannot open library file '<path>\QtGuid_s.a'

which is caused by the generated Makefile line

LIBS = -Le:\usr\lib -lQtGuid -lQtCored

A search both locally and using 'yum provides' indicates that no library named QtGuid?* exists anywhere.

Changing the above Makefile line to specify -lQtGui4 and -lQtCore4 allows build to complete, although presumably debug traces within the Qt4 runtime itself will not be possible.

Change History (3)

comment:1 Changed 6 years ago by Silvan Scherrer

thats a known issue. To have this possibility you need to build Qt4 debug yourself. This will all change with Qt5

comment:2 Changed 6 years ago by Alex Taylor

Noted, thanks.

Maybe it would be worth putting a mention of this on the qt4 trac wiki?

comment:3 Changed 6 years ago by Dmitry A. Kuminov

Resolution: fixed
Status: newclosed

Well, it's not an issue, strictly speaking. It's the Qt design. It behaves the same way also on Windows and on Mac. Debug builds of libraries get special "d" suffixes there ("debug" in case of Mac). So the same applies when linking to these libraries in debug mode. And it actually makes sense as if you want to debug your app you will usually build Qt yourself — as debugging it otherwise is quite meaningless w/o the Qt debug information as you already noticed.

However, I created https://github.com/bitwiseworks/qtbase-os2/issues/30 to reconsider this subject in Qt5. Closing this here.

Note: See TracTickets for help on using tickets.