[Interest] How to deploy a qml app with Qt built statically?

Thiago Macieira thiago.macieira at intel.com
Fri May 22 18:44:09 CEST 2015


On Friday 22 May 2015 16:37:27 Nuno Santos wrote:
> Hi,
> 
> I have compiled Qt statically. In this process I have found two
> difficulties:
> 
> - If I don't compile it with -developer-build I don't have the plugins
> compiled

That's a bug, please report.

> - When I finally got plugins compiled, they are static libs

Of course.

> When my program is about to start it asks about plugin windows (i assume
> it is the platforms/qwindows.dll)

Which is a static library that you need to link into your application. Qmake 
has some logic to automatically process staticplugins.

> What is the process to deploy an application with a static build of qt?

Try a lot and figure it out for the plugins. Make sure they are getting linked 
into your binary and make sure they are getting initialised too. For each 
staticplugin, qmake should generate an extra .cpp file that calls a function 
from the plugin to register itself.

In order to do that, you need to list all plugins you want to use in a 
variable (I don't remember the name, it must be in the docs).

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




More information about the Interest mailing list