Qt5 Static Build Yields Failed to Load Platform Plugin "Windows"

Qt5 Static Build yields Failed to load platform plugin windows

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

opengl32.lib
Qt5PlatformSupport.lib
qwindows.lib

I also added the following to my code:

#include <QtPlugin>
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);

Qt application: Failed to load platform plugin “windows”

First, detect what .dll files are missing. Download and run Dependency Walker. Open (or drag on the main window) application's .exe file. In the first level of the dependency tree there will be shown .dll files of the application

Dependency Walker screenshot

A .dll with the yellow question mark icon is missing. You should either copy all missing .dll files into the application folder or add the folder with .dll files into the PATH environment variable.

Qt application: Failed to load platform plugin windows. Available platforms are:

I haven't looked at Qt 5.0 yet, but if they have plugin platforms now, you have to make sure your app can find them at runtime. Apparently QtCreator sets up PATH properly, so all the plugins are there, no need to rebuild Qt.

Find the plugins folder, copy necessary plugins into your install folder (make sure to keep the structure, so "plugins/imageformats/.../bla.dll", etc), create qt.conf file and set plugins path to be ".". Drop qt.conf file into your install folder as well.

Qt 5.1.1: Application failed to start because platform plugin windows is missing

Okay, as posted here https://stackoverflow.com/a/17271172/1458552 without much attention by other users:

The libEGL.dll was missing! Even though this has not been reported when trying to start the application (all other *.dlls such as Qt5Gui.dll had been reported).

(Qt 5.7.0) Could not find or load the qt platform plugin windows

WHY THE PROBLEM OCCURRED

Honestly, I don't know. But it very much seems like "Alexander Saprykin" answer is correct. During the process of testing, i had to update my Qt so it could fairly well be only a version mismatch.

Also, the fact that when I redid my build using only Qt 5.7.0 it worked, implies that it was indeed only a mismatch case.

HOW I FIXED IT

As told by "Sebastian Lange" in the comments, using windeplyqt.exe did the job. I just deleted everything but the .exe in my build folder, opened Qt5.7 command line, chaged directory to the same as my .exe and ran the command windeployqt . or windeployqt [name_of_exe].exe

Thanks to everyone!

Failed to load platform plugin windows. Available platforms are : Error

The platform plugin dlls would need to be put into the platforms subfolder and then it will work.

Qt 5.3.1 application error: Could not find or load the Qt platform plugin windows

Solved by copying DLL from Qt's folder to ../MyApp/platforms/qwindows.dll.

Note: there is no "plugins" directory in path



Related Topics



Leave a reply



Submit