[Interest] QtPlugins statically linked not loading

Ulf Hermann ulf.hermann at theqtcompany.com
Mon Jun 1 18:37:45 CEST 2015


On 06/01/2015 06:10 PM, Thiago Macieira wrote:
> On Monday 01 June 2015 15:01:14 Ulf Hermann wrote:
>> You probably have to add the following somewhere:
>>
>> LIBS += /path/to/libqmldbg_tcp.a
>
> but like I said, he shouldn't have to. That's a bug in QtQml that it uses
> qmldbg_tcp without linking to it.

This is a static build. There is no dynamic linking. The only way to make this work would be to build the plugin into QtQml. Actually it used to do this, until fac14e459734936320003c3e593481c9cb6079e5 - which explicitly avoided it with the following reasoning:

> commit fac14e459734936320003c3e593481c9cb6079e5
> Author: Pasi Petäjäjärvi <pasi.petajajarvi at digia.com>
> Date:   Fri Oct 24 11:31:38 2014 +0300
>
>     Don't embded qmldbg_tcp plugin to libQt5Qml in static build
>
>     Embedding qmldbg_tcp sources to libQt5Qml causes multipled
>     definitions of QTcpServerConnection symbols with static
>     build on Qt Quick 2 applications. Qmake can resolve
>     dependencies to static plugins applications use, so no
>     need to embed this to libQt5Qml.
>
>     Change-Id: I18c5e44b9ac3de4ef8be29cc5944de3527566b3c
>     Reviewed-by: Fawzi Mohamed <fawzi.mohamed at theqtcompany.com>

Now, I really don't know what qmake magic he is referring to here and where the multiple definitions came from. Maybe qmake is supposed to automatically add libqmldbg_tcp.a to the linker command line.


-- 
Ulf Hermann, Software Engineer | The Qt Company

The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

Email: ulf.hermann at theqtcompany.com | Mobile: + 49 151 68964561 | Phone: +49 30 63 92 3255 www.qt.io |Qt Blog: http://blog.qt.digia.com/ | Twitter: @QtbyDigia, @Qtproject | Facebook: www.facebook.com/qt



More information about the Interest mailing list