[Qt-interest] Question on static building of qt based libs
Matthias Pospiech
matthias.pospiech at gmx.de
Tue Mar 2 09:14:33 CET 2010
Thiago Macieira schrieb:
> Em Terça-feira 2. Março 2010, às 08.09.57, Matthias Pospiech escreveu:
>
>> I have a external (open source) library which is build using qt, but has
>> no dll export declarations,
>> which means that I can not have .lib files for msvc (mingw works though).
>> If I compile this lib static, does this require any other lib (e.g. the
>> qt libs), to be static build as well,
>> or is this completely independend and nothing I need to worry about?
>>
>
> Hi Matthias
>
> If a given library is static, everything that depends on it must link to it
> statically. And you can't link a DLL to a static library, but you can link a
> program.
>
>
In this case I was thinking about the Qextserialport class which is
truely plattformindependent, but not
ready for msvc because of the missing dllspec delcarations. I remember
that I created the lib two years
ago by creating a def file and from that the lib. But that is nasty.
Now I want to create a demo application using that library for a college
and would like to ship
a library version compiled with the latest Qt Version. But from your
explanation I understand that
a static dll which depeneds upon Qt requires a static build of Qt, which
I do not have and do not plan
to compile. So I will have to go through the steps to create a .lib from
a .dll.
Matthias
More information about the Qt-interest-old
mailing list