1

I have a problem with my qt deployment under windows 10. I'm using QtCreator 4.5.1 and Qt 5.11 on Windows 10. I execute my application in release mode. Then I open the command line by running Qt5.11.0 for Desktop(MinGw 5.3.0 32 bit). There I give the path of the release folder (where my exe file exists):

C:\Qt\workspace\build-CanSaveLog2FilterError2DataExploreClass6-Desktop_Qt_5_11_0_MinGW_32bit2-Release\release

After that I type this line:

windeployqt.exe --quick .

and all the necessary .dll files and platforms and plugins will be generated.

When I do this to a simple qt project, it works fine and my exe file can be executed correctly. Whereas when I do the same to my desired project, I can't execute my exe file and I get this error:

This application failed to start because it could not load the Qt platform plugin "windows" 
in "", even though it was found. This is usually due to missing dependencies which you can find by setting the env variable QT_DEBUG_PLUGINS to 1. 
Available platform plugins are: windows.
Reinstalling the application may fix this problem.

I tried to find dll file by executing it in dependency walker. When I did this, it showed a lot of dll files missing such as "API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL" which doesn't exist even in bin folder of mingw. While if I put the exe file in the bin folder of mingw it works fine.

So I tried to find all the main dll files whose their sub dll files were missing and copied them to the release folder. For example for API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL, I copied Qt5core.DLL to the release folder. But it didn't work again.

I can't understand where the problem is. Could you please help me to resolve it? Since yesterday morning I'm searching and can't find the solution.

mahya
  • 11
  • 2
  • I believe you don't need this `API-MS-WIN-*` dlls. You might start with copying the `plugins` directory from your Qt installation to the same directory where your executable is. Of course, you don't need all plugins - you can filter subdirectories yourself. – vahancho Apr 18 '18 at 11:50
  • Check with [dependency walker](http://www.dependencywalker.com/) what are the missing dependencies. Just open the deployed exe with it and it will tell you if you are missing any DLL. – Sergio Monteleone Apr 18 '18 at 12:14
  • @vahancho Thank you so much. I copied the plugins folder to the application's release directory and it worked. – mahya Apr 18 '18 at 12:31

0 Answers0