[Interest] Linking static plugins on Linux

Thiago Macieira thiago.macieira at intel.com
Tue Oct 25 05:35:11 CEST 2016

Em quinta-feira, 15 de setembro de 2016, às 20:14:01 PDT, Macumber, Daniel 
> 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?

Are you using qmake to generate your Makefile? Or something else?

Note that the order of static libraries is important, so we need to know the 
exact link command-line that was issued.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Interest mailing list