[Interest] Unable to build with CONFIG+=debug due to missing libraries
Andreas Pakulat
apaku at gmx.de
Sun Mar 1 01:01:05 CET 2015
Hi Nikos,
On Sat, Feb 28, 2015 at 2:43 PM, Nikos Chantziaras <realnc at gmail.com> wrote:
> On 28/02/15 15:36, Andreas Pakulat wrote:
> > Hi Nikos,
> >
> > On Sat, Feb 28, 2015 at 1:01 PM, Nikos Chantziaras <realnc at gmail.com
> > <mailto:realnc at gmail.com>> wrote:
> >
> > qmake CONFIG+=debug
> > make
> > ...
> > make[1]: *** No rule to make target 'libQt5Widgetsd.a'
> >
> > 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.
>
> I'm not trying to mix them. I just want to compile my code with debug
> symbols so that I can use gdb. I've been doing this for ages with
> mingw32 using "-g". AFAIK, the C runtime library got nothing to do with it.
>
Ah, MinGW, I somehow read nmake there in your output and then assumed an
MSVC toolchain. Well qmake simply does not have as much convenience options
as other build tools may have and makes certain assumptions as you can see.
In this particular case I can imagine this being done because qmake has
historically been developed to build Qt itself and you really don't want
your debug-qwidgets library to link against the release-qtcore version.
> Frankly, this doesn't make much sense to me.
It makes all the sense if you build Qt itself and since the creating Qt
never really was about 'write a buildsystem', the tool has mostly been
developed to suit building Qt. Its possible to use it for other things, but
you may have to do ugly things like changing the CXX flags yourself.
Anyway, as you noticed already patching the CXX flags is the way to go
(maybe you could patch the mkspecs to set only -g for the debug option, but
its been a really long time since I looked closer at qmake buildsystems).
Or consider getting involved in qmake development and see if you can
improve its logic to give developers more freedom about this.
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150301/8ecadbd4/attachment.html>
More information about the Interest
mailing list