I have looked through all of the questions that appear to be related on stack overflow, and none of the solutions seem to help me.
I am building a Qt application with this setup:
configure -developer-build -debug-and-release -opensource -nomake examples -nomake tests -platform win32-msvc2012 -no-opengl
QMAKE_CXX += /D_USING_V110_SDK71_
I can build and run my program fine on my development machine (noted above); I can also install and run the package from Program Files directory on dev machine.
When I install and run on a Windows Vista machine (multiple machines)
(also fails on a clean install of Windows 7)
I get:
Application failed to start because it could not find or load the QT platform plugin "windows"
So I followed the instructions and added a .platforms/ directory, and added qwindows.dll (also added qminimal.dll and qoffscreen.dll); I also added libEGL.dll, libGLESv2.dll (even though I shouldn't need them I don't think)
Once I added qoffscreen.dll I now get the additional message: Available platform plugins are: offscreen
If I run through Dependency Walker I get this error listed:
GetProcAddress(0x76CA0000 [KERNEL32.DLL], "GetCurrentPackageId") called from "MSVCR110.DLL" at address 0x6AC6FDFA and returned NULL. Error: The specified procedure could not be found (127).
and then further down get the:
GetProcAddress(0x745A0000 [UXTHEME.DLL], "BufferedPaintUnInit") called from "COMCTL32.DLL" at address 0x745FFBF8 and returned 0x745AE18C. This application failed to start because it could not find or load the Qt platform plugin "windows". Available platform plugins are: offscreen. Reinstalling the application may fix this problem.
Any ideas how to fix this dll issue?
Sometimes corrupted system files can trigger various errors and issues when running your apps such as the “no Qt platform plugin could be initialized” error. So, we recommend you run an SFC scan or DISM to check system files.
If the Pycharm console or debugger are showing “Could not find or load the Qt platform plugin windows”, the Python EXE file may be located at a different location for the PyCharm interpreter. You might manually select it in File -> Settings -> Interpreter.
Note: You can install only plugins that are supported by your Qt Creator version. To install plugins: Select Help > About Plugins > Install Plugins. In the Source dialog, enter the path to the archive or library that contains the plugin.
The error is caused because the program can't find qwindows.dll
qwindows.dll
has to be in a folder named platforms
so that the path from your executable to the dll is platforms/qwindows.dll
Whereas this wasn't enough in my case. I had also to add following line at the beginning of my main()
QCoreApplication::addLibraryPath("./");
Then everything worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With