'Qt static build missing windows plugin

I've compiled Qt 5.9.3 to static library using

configure -static -release -platform win32-msvc

I'm compiling my application and it compiles and links successfully but when I start it it fails with

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

The problem is clearly that it fails to find the qwindows plugin which is now a .lib and not a .dll
I tried adding qwindows.lib to the linker input files but that did not have any effect.
Is there a known fix for this issue?



Solution 1:[1]

May be you linked another Qt lib. If so, your application will require windows plugin. Use tools like dependcy walker http://dependencywalker.com/ find out what dll your application depends on. Tips: I used to installed anaconda, and build qt from source, my application linked qt lib of anaconda, so it require windows plugin and never find the dll.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1