Qt5 Static Build yields Failed to load platform plugin "windows" Qt5 Static Build yields Failed to load platform plugin "windows" windows windows

Qt5 Static Build yields Failed to load platform plugin "windows"


For dynamic build only: Make sure you move the qwindows.dll to the following directory:

yourapp.exeQt5Core.dll...platforms/qwindows.dll...

Note that the plugins directory is missing! You put all the needed folders from QT_BASE/.../plugins/* directly together with your binaries.BTW: I did not need libEGL.dll, but my application almost has no GUI.

My source: http://qt-project.org/forums/viewthread/27056/#122588


I solved it. Thanks to this I was able to get everything to work. I added the following libraries:

opengl32.libQt5PlatformSupport.libqwindows.lib

I also added the following to my code:

#include <QtPlugin>Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);


I had the same error with MinGW version of Qt (not static): "Failed to load platform plugin windows".

The solution for me was to add the DLLs libEGL.dll and libEGLd.dll.