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] Qt5 static linking problem


From: Mark Brand
Subject: Re: [Mingw-cross-env-list] Qt5 static linking problem
Date: Fri, 26 Apr 2013 00:59:53 +0200
User-agent: KMail/4.10.2 (Linux/3.8.0-19-generic; KDE/4.10.2; x86_64; ; )

On Thursday 25 April 2013 22:30:10 Martin Lambers wrote:
> Hi,
> 
> I'm moving from Qt4 to Qt5, and I hit the following problem:
> 
> The application builds and links fine, but when running (under Wine),
> it exits with the following message:
> -----
> Failed to load platform plugin "windows". Available platforms are:
> 
> 
> abnormal program termination
> -----
> 
> Note that I don't use qmake. I detect the Qt5Widgets module with
> pkg-config, and this drags in Qt5Gui and Qt5Core.
> 
> Google has lots of hits for this error message, but nothing conclusive.
> 
> Do you have any hints?
> 
> Regards,
> Martin


Hi Martin,

Qt 5 uses platform plugins. When linking statically, the usual procedure [1] 
for linking to static plugins is necessary. However, qmake does this 
automatically for the platform plugin. It adds a special source file to the 
project and links to the static plugin library. If you are using pkg-config 
instead of qmake, you will have to do it explicitly. You might want to look at 
how qmake sets up a simple project.

Mark

[1] http://qt-project.org/doc/qt-5.0/qtcore/plugins-howto.html#static-plugins



reply via email to

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