Solved .exe file is not opening
I have completed a Qt project and it is running successfully in Qt tool. But, in build folder, under release subfolder (built only on release not debug), the .exe file when on clicking, it is not starting. Then. I have run the command prompt of Qt and used windeployqt.exe . to import all the libraries. But, again it is not starting. All the libraries are there. It is trying to load but not starting. No error Message appeared
@Vijaykarthikeyan One reason could be a plug-in which fails to load. To debug this set QT_DEBUG_PLUGINS to one in terminal and then start the app from same terminal. Check the output.
Also check whether really all dependencies were deployed. On Windows you can use https://www.dependencywalker.com/ for that.
JonB last edited by
I have run the command prompt of Qt and used windeployqt.exe
but have you used it correctly ? there are options/arguments that may be important.
Or you may also have used the wrong deployment tool as each kit has its own tool etc.. We need some more informations here
@jsulm Now, I have build my project on Debug mode and check that in Qt- Creator. It works well.
And when running on Command terminal alone, it also works.
I came to know that, running in debug mode will run the .exe file correctly but eventually takes more RAM and memory as it initializes the variables to the value whereas release version stripped off those one during optimization.
Now, which one is preferrable?
@J-Hilk I have simply used windeployqt.exe .
I though this " . " means all
Regarding the tool, I have used msvc 32 bit in creator..and also opened msvc 32 bit command terminal to use this command line windeployqt.exe .
@Vijaykarthikeyan are you using QML in your project ?
@J-Hilk yes.. QML for front end design..
C++ for backend processing
@Vijaykarthikeyan than you're most certainly missing the QML part during windeployqt call:
with <directory> being the full path to your main QML folder, as in where your main.qml is
otherwise how should the tool know what from QML you used in your application
@J-Hilk Are you mentioning about this directory,
I don't want to mention any specific directory because I want to deploy in various target systems. That's why I preferred this one over local directory
@Vijaykarthikeyan you misunderstand, the windeployqt tool needs to know where your own qml files are so it can parse them, and according to the imports used, copy the needed dlls/modules over.
if you don't specify your qml folder via
--qmldirthat part of the deployment will be missing.
the tool will NOT copy any of your QML files over
@J-Hilk Somewhat understandable.. but still confused.. I understand that i have to include --qmldir <path/to/qml>
Can you show me some minimal example..please,sir
This post is deleted!
@jsulm I'm succesfully executed that command line : windeployqt --qmldir <path to qml directory in qt version> <bin_file>.exe..
it is successfully scanned without any error:
but,then i try to run the.exe file,it is again not running
@jsulm same issue.
after running the command in corresponding directory like: windeployqt.exe --qmldir <path/to/qml library> <file_name.exe> ..it is scanned and updated allthe required libraries
when running that project's .exe file.,it is showing showMaximized,widgets.dll,webengine.dll,qt5core.dll,webenignecore.dll is not located in dll
all the requires libraries are updated but it shows error like this:
Is that any wrong with my command?
johngod last edited by
windeployqt.exe --qmldir <path/to/qml library> <file_name.exe> --compiler-runtime
If you use Qt6 you need to use windeployqt6.exe instead of windeployqt.exe and you need to add --compiler-runtime to copy the missing compiler files
To sum it all up, I usually create a folder were I copy only the executable file, cd in to that folder and run the windeployqt6 from there:
C:\QtOpensourse\6.5.0\mingw_64\bin\windeployqt6.exe --qmldir D:\qtprojets\MyApp D:\qtprojets\MyAppDeployFolder\MyApp.exe --compiler-runtime
If you have several Qt versions, you should use the same windeployqt6.exe version of the compiled exe file
@johngod I'm using 5.15.2
johngod last edited by
@Vijaykarthikeyan Did it work ? If so, please mark the this as solved.