mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Building fully static builds of Qt5 issues


From: Martin Müllenhaupt
Subject: Re: [Mingw-cross-env-list] Building fully static builds of Qt5 issues
Date: Wed, 22 Oct 2014 13:54:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Hi N. N.,

On 21.10.2014 23:02, N. N. wrote:
> Now, since we want a 100% static build for Qt5 applications, what magic must 
> be done to fix this?

I didn't use Qt5 yet, but for Qt4, there was some special code needed to init 
static qt plugins.
The issue is described here: 
http://qt-project.org/doc/qt-4.8/plugins-howto.html#static-plugins

And this is the example they gave:

#include <QApplication>
#include <QtPlugin>

Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qkrcodecs)

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    ...
    return app.exec();
}

The qt5-doc (http://qt-project.org/doc/qt-5/plugins-howto.html#static-plugins) 
states, that the 
Q_IMPORT_PLUGIN() code is automatically generated by qmake. Maybe you are not 
using qmake or qmake is doing something wrong.

Hope this helps.

Regards,
Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]