Debug application with self-compiled Qt

84 views Asked by At

Since there is no official Qt 5.4.2 binary x64 release for Visual Studio 2010 I have compiled it on my own.

Now when I try to debug my application, it won't link because there are no Qt *d.lib's.

Do I need to compile Qt with debugging information, if I don't want to debug Qt library but only my app? How to tell qmake/qtcreator to link non-debug Qt with my debug target?

1

There are 1 answers

0
Amartel On

This functionality is defined in prf files (example for Qt4 - for Qt5 will be similar):

./mkspecs/features/win32/windows.prf:

9 CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d

./mkspecs/features/qt.prf:

112 CONFIG(debug, debug|release):QT_LINKAGE = -l$${QTPLUG}d

127 CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll

./mkspecs/features/qt_functions.prf:

75 win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d

./mkspecs/features/uitools.prf:

10 win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d

Still, not sure if this will work correctly, that's why I recommend you to build both debug and release version of libraries.