Failed to load qwindows.dll with Qt 5.4.2, worked fine in 5.4.1
Everything worked great for me until I updated from 5.4.1 to 5.4.2. Now, when I build a release installer and run my dynamically-linked program on another, clean PC, I get the "Failed to load plugin "windows" error. Naturally, I do have the
platform/qwindows.dllfile installed to the app's root path. What could be the problem?
This is msvc2013_opengl Qt version (32-bit).
I don't really see any solution there.
You are right it is more the description of the problem itself.
The second post gives the hint that the update of dlls brought the solution.
Possibly you have another case of these inconsistencies.
My recommendation would to make sure that all the dlls and plugins are consistently from the same version derived.
They're all marked 5.4.2, that's for sure. I've deleted 5.4.1 entirely and then installed 5.4.2 via the online installer.
It does work on the PC where I build the app, though! Meaning, the one where Qt is.
Did you check JIRA already?
Otherwise it might be worth to file a report.
Frankly, I don't have time for that. Need to fix the build right now.
I did not find any references to Qt bugtracker when Googling for this issue.
Oh, I know, I've reported quite a few bugs over the years. What I was saying is that I didn't find any reference to this issue on Jira.
By the way, I have a workaround for the issue. I've attempted debugging Qt sources on the machine where loading
qwindows.dllfails, and noticed that
QCoreApplication::libraryPathsreturns empty list, while it does return a valid path on the machine where it works fine. So, I added this one line to the
if (argc >= 1 && argv != nullptr) QCoreApplication::addLibraryPath(QFileInfo(argv).absolutePath());
And now my application runs again, on all the PCs where I've tested it!