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.dll file installed to the app's root path. What could be the problem?

    This is msvc2013_opengl Qt version (32-bit).



  • @Violet-Giraffe

    This looks similar I guess.



  • I don't really see any solution there.



  • @Violet-Giraffe
    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.



  • @Violet-Giraffe
    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.



  • @Violet-Giraffe

    This is JIRA

    Googling "Qt JIRA" is typically enough.



  • 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.dll fails, and noticed that QCoreApplication::libraryPaths returns empty list, while it does return a valid path on the machine where it works fine. So, I added this one line to the main function before QApplication is created:

    if (argc >= 1 && argv != nullptr)
    	QCoreApplication::addLibraryPath(QFileInfo(argv[0]).absolutePath());
    

    And now my application runs again, on all the PCs where I've tested it!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.