[Interest] Problem creating a dll that uses Qt (mingw)
Thiago Macieira
thiago at kde.org
Mon Jan 16 17:00:38 CET 2012
On Monday, 16 de January de 2012 15.52.44, erick oliveira da silva wrote:
> Hi,
>
> I am new with qt programming using mingw.
>
> I have compiled Qt 4.7.4 statically with gcc(mingw) version 4.4.0 at
> windows vista 32 bits, following the instructions in this page:
> http://developer.qt.nokia.com/wiki/How_to_build_a_static_Qt_version_for_Wind
> ows_with_gcc
>
> I can build static libraries and qt applications without any problem, but
> when I try to build a shared library(dll) that uses qt, I get several
> "undefined reference" linking errors in qt functions form QString, QDialog,
> etc...
Please make sure that you have a completely separate build directory for the
DLL build. You can share the sources with the static build, provided you did
not build the static one in the sources.
The cleanest way is to make them completely separate.
> The pro files I created till now build shared libraries in gcc linux
> without any problem, but not in gcc windows(mingw). Do I need to define a
> special qmake variable in the pro file to build suscessfully a qt dll in
> gcc at windows?
No, the same .pro file should be enough, provided you use the right qmake.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120116/a21670ff/attachment.sig>
More information about the Interest
mailing list