I want to use a static build of Qt 5.4. Since there is no precompiled static build available, you have to build one from the Qt source code yourself.
My environment
I found the solution:
You have to add the following libraries to your additional dependencies in Visual Studio:
Ws2_32.lib
opengl32.lib
qtharfbuzzng.lib
Then, my project finally compiled.
However, that is not the end of the story:
Although successfully compiled, my application showed the following error message on startup:
This application failed to start because it could not find or load the Qt platform plugin "windows".
To solve this, you have to add even more libraries to your additional dependencies:
imm32.lib
winmm.lib
Qt5PlatformSupport.lib
qwindows.lib
...and the following to your additional library directories:
$(QTDIR)\plugins\platforms
...and the following to your source code:
#include <QtPlugin>
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
Done! Finally, I was able to link against static Qt libraries.
It was worth the effort:
The cold startup time of my application improved dramatically from about 10 seconds to less than 1 second. And instead of 14 MB DLL-files I only have to deploy a single 8 MB EXE-file.