[Interest] Unable to build with CONFIG+=debug due to missing libraries

Andreas Pakulat apaku at gmx.de
Sat Feb 28 14:36:52 CET 2015


Hi Nikos,

On Sat, Feb 28, 2015 at 1:01 PM, Nikos Chantziaras <realnc at gmail.com> wrote:

> On Linux, I can always build my project with CONFIG+=debug and debug it.
> I don't have a debug version of Qt installed. Just the release one.
>
> But when building for Windows, this doesn't work:
>
>    qmake CONFIG+=debug
>    make
>    ...
>    make[1]: *** No rule to make target 'libQt5Widgetsd.a'
>
> Why is that? I'm not trying to debug Qt. I just want to debug my own app
> by having it build with debug compiler flags. The only way I can do that
> for Windows is manually specifying QMAKE_*FLAGS, which is cumbersome.
>
> Is this a bug, or intended on Windows?
>

Thats because windows has two separate C runtime dll's, one for release and
one for debug and you cannot mix them in an application (and any of the
other dll's it uses) easily. Unless qmake gained some new flag for Qt5,
qmake only differs between release and debug and debug means using the
debug C runtime and a corresponding qt debug build. Your only options are
to either get a debug qt version or setup the necessary compiler flags for
generating debug symbols (but not linking against the debug C runtime)
yourself. For MSVC thats /Zi passed to the compiler.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150228/510db539/attachment.html>


More information about the Interest mailing list