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@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to