[Interest] Figuring out qmake and -static install use

Tuncer Ayaz tuncer.ayaz at gmail.com
Mon Oct 5 11:11:56 CEST 2015


On Sun, Oct 4, 2015 at 11:54 PM, Thiago Macieira wrote:
> On Sunday 04 October 2015 23:23:35 Tuncer Ayaz wrote:
> > I'm trying to fix static linking against Qt5 in mkvtoolnix-gui,
> > and because it has its own autoconf+make build system, I need to
> > figure out how to link in the archives (.a) such that there's no
> > runtime error trying to load a non-existent xcb plugin .so for a
> > Qt5.5 install that was built with "./configure -static [...]". I
> > know that the Qt5.5 install works flawlessly when linking
> > qcachegrind, so it should be enough to understand what qmake does
> > and replicate that in mkvtoolnix's build system. Any pointers for
> > me to investigate?
>
> You need to link to the libqxcb.a library (static plugin) and you
> need to add an extra file to your build that will cause it to be
> linked and registered into the plugin system.

I already did the first step (libqxcb.a), but it was still trying to
load a plugin. What is that extra file you mention and where does it
fit into the build process?

> I don't have a ready static build here to check, but I think qmake
> generates an extra file per plugin (check mkspecs/modules and
> plugins/platforms) that contains the necessary class name. You can
> also just try to do the same with qmake and see what it generates.

I glanced over the qcachegrind Makefiles and nothing interesting stood
out. I may have to look into it again. To be honest, it's surprising
there's no demo project or documentation for this for anyone who
doesn't use CMake or qmake.



More information about the Interest mailing list