Demat Demat - 1 month ago 14
C++ Question

Qt platform plugin "windows" is not found on one computer

I have an application built with Qt 5.5, deployed and running on x86 Windows 7 with dynamic linking. When I try to launch it on that particular computer, I get the following error:


This application failed to start because it could not find or load the
Qt platform plugin "windows".

Available platform plugins are: minimal, offscreen, windows, windows.

Reinstalling the application may fix the problem.


The "windows" plugin is indeed repeated twice in the list.

Though I have the libraries set up properly, such that they run without an issue on my main computer, here, the
platforms
directory doesn't seem to be found.

File list:

MyProject\platforms\qwindows.dll
MyProject\Qt5Core.dll
MyProject\Qt5Cored.dll
MyProject\Qt5Gui.dll
MyProject\Qt5Guid.dll
MyProject\Qt5Widgets.dll
MyProject\Qt5Widgetsd.dll
MyProject\MyProject.exe


Many similar questions can be found about this error, but I have tried all the answers I have found about it (including changing file and folder names, adding various extra Qt libraries to the directory, etc.) without success. I have built the application again while making sure that all components have the right architecture, again without success.

Other than static linking, how can I make it run?

Answer

Try to use windeployqt. It'll try to autocollect all needed libraries.