I have a problem deploying my Qt 5.3.1
application. This is my folder structure:
platforms\
qwindows.dll
qminimal.dll
libEGL.dll
sqldrivers\
qsqlite.dll
Qt5Widgets.dll
icuin52.dll
libwinpthread-1.dll
libgcc_s_dw2-1.dll
icuuc52.dll
Qt5Sql.dll
Qt5Core.dll
program.exe
libGLESv2.dll
Qt5Gui.dll
libstdc++-6.dll
icudt52.dll
libEGL.dll
Application starts and works fine on a machine without Qt installed. I want it to start with Windows, so I modify the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\Run
. But when I log on to Windows, a have an error message:
The application failed to start because it could not find or load the Qt platform plugin "Windows". Reinstalling the application can fix this problem.
Then my application crashes. Please mention that I have provided platforms\qwindows.dll
and libEGL.dll
. Adding to PATH value ...\platforms\
does not help either. And everything is fine if I launch the application by clicking on it.
What else it could be?
UPD:
The only solution I could find on the Internet right now is to set environment variable QT_QPA_PLATFORM_PLUGIN_PATH
to the directory which contains qwindows.dll
. But it is not a great idea.
Solution:
The answer is here. Adding two additional command line parameters -platformpluginpath
and path\to\qwindows\directory
solved my problem.