[Releasing] Report on static builds of current Qt 5 beta1

Thiago Macieira thiago.macieira at intel.com
Wed Jul 25 09:55:54 CEST 2012

On quarta-feira, 25 de julho de 2012 12.26.16, Keith Isdale wrote:
>    QTBUG-26636: Examples do not run for static build of Qt

I've experienced that too. The problem is that the QPA plugin is not built 
into the executable, so the application can't load it. In order to make it 
work, today you need to:

1) edit your .pro file to explicitly link the QPA plugin of your choice to your 

2) add Q_IMPORT_PLUGIN to one of your .cpp files to actually import the plugin

Current shortcomings:
- unlike Qt 4, in Qt 5 the Q_IMPORT_PLUGIN macro takes the class name of the 
plugin, not the plugin name. That means the class name becomes part of the 
plugin interface. I'd like to change that, but it requires modifying the new 
plugin structure.

 - some plugin names are too simple, so you can't use QTPLUGIN for them. For 
	QTPLUGIN += xcb
will add -lxcb to the link command-line, which will of course not work (the 
XCB library itself is called libxcb, in /usr/lib). You need to add the full 
path and file name to the plugin in LIBS.

Also, remember that Qt examples are *not* expected to work in static builds. 
They are not part of the testing and do not block the release. We should just 
understand the issues above to decide if we need to make changes before we 

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/releasing/attachments/20120725/863f8cc4/attachment.sig>

More information about the Releasing mailing list