[Interest] Linking static plugins on Linux

Jean-Michaël Celerier jeanmichael.celerier at gmail.com
Mon Oct 24 19:07:43 CEST 2016


I don't think that the Linux plug-in is QWindowsIntegrationPlugin... Maybe
QXcb?

Best,

-------
Jean-Michaël Celerier
http://www.jcelerier.name

On Thu, Sep 15, 2016 at 10:14 PM, Macumber, Daniel <Daniel.Macumber at nrel.gov
> wrote:

> Hello, I have an application which I am linking with static Qt and static
> plugins (QSQLiteDriverPlugin, platform plugins):
>
>
>
>   Q_IMPORT_PLUGIN(QSQLiteDriverPlugin);
>
>
>
>   #if defined(Q_OS_OSX)
>
>     Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
>
>   #elif defined(Q_OS_WIN)
>
>     Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
>
>   #elif defined(Q_OS_LINUX)
>
>     Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
>
>   #endif
>
>
>
> On Windows and Mac, things are working fine.  However, on Ubuntu 14.04
> (using gcc 4.8) it does not appear that dependencies of the static plugins
> are being linked with my application.  I am sending libxcb-static.a,
> libQt5Sql.a, etc to the linker but it appears that the linker does not
> think symbols from these libraries are used and they do not get linked in
> with my application.  Then, when I run my application, it attemps to load
> the plugin and immediately fails due to unresolved symbols.  I have tried
> defining QT_STATICPLUGIN but that does not seem to have an effect.
>
>
>
> Is there any way to force static plugin dependencies to be linked with my
> application on Ubuntu with gcc?
>
>
>
> Thanks a lot,
> Dan
>
>
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161024/fc104d95/attachment.html>


More information about the Interest mailing list