[Interest] Problem creating a dll that uses Qt (mingw)

erick oliveira da silva eosilva2000 at ig.com.br
Mon Jan 16 15:52:44 CET 2012


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_Windows_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...

Even the most simple dll, using for example only QString, or a "Hello
world" with QMessageBox, I can not link suscessfully. Have I forgot an
important configuration variable in the project file?

I use qmake to create all my makefiles.

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?

Thanks in advance,
Erick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120116/43274e18/attachment.html>


More information about the Interest mailing list