Deployed exe not working on same computer
-
Hello. I compiled my project with Release profile. Somehow though I chose
Release
in shadow build folder it creates bothdebug
andrelease
folders and the release one is completely empty. But in the debug folder I could find my executable.
Then I placed it in separate folder and using mingw terminal usedwindeployqt.exe
on it. It created me a list of DLL and folders inside the directory and according to different tutorials I've seen on the internet my application should launch from that directory. But it doesn't. I get no error messages, just nothing happens.
I've tried another method where I manually copied all the DLLs into the folder with my executable, but I get the same result.
This post is about the same issue, but in my case windeployqt.exe already created those files that helped him.
Any suggestions would be appreciated. -
Hello. I compiled my project with Release profile. Somehow though I chose
Release
in shadow build folder it creates bothdebug
andrelease
folders and the release one is completely empty. But in the debug folder I could find my executable.
Then I placed it in separate folder and using mingw terminal usedwindeployqt.exe
on it. It created me a list of DLL and folders inside the directory and according to different tutorials I've seen on the internet my application should launch from that directory. But it doesn't. I get no error messages, just nothing happens.
I've tried another method where I manually copied all the DLLs into the folder with my executable, but I get the same result.
This post is about the same issue, but in my case windeployqt.exe already created those files that helped him.
Any suggestions would be appreciated.@PavloPonomarov said in Deployed exe not working on same computer:
Hello. I compiled my project with Release profile. Somehow though I chose
Release
in shadow build folder it creates bothdebug
andrelease
folders and the release one is completely empty. But in the debug folder I could find my executable.Sounds like something has gone wrong at this step. I wouldn't try to deploy the app until you can get a Release build to appear in the
release
folder.Questions:
- If you create a new "Hello world" app, can you get a Release build to appear in the
release
folder? - If "Yes" to #1, can you deploy that app and run it?
- What external libraries (if any) are used by your project?
- If your project uses Qt Quick/QML, did you deploy the QML files (including
qmldir
)? See https://wiki.qt.io/Deploy_an_Application_on_Windows
- If you create a new "Hello world" app, can you get a Release build to appear in the
-
@PavloPonomarov said in Deployed exe not working on same computer:
Somehow though I chose Release in shadow build folder it creates both debug and release folders and the release one is completely empty. But in the debug folder I could find my executable.
Are you sure you are looking at the right folder?
If you configure the project by the default configuration of Qt Creator and have built in both debug and release, there should be two building folders, one is namedbuild-xxx-Debug
and the other isbuild-xxx-Release
.
Both will havedebug
andrelease
subfolders in them, but thebuild-xxx-Debug
one will have an emptyrelease
and thebuild-xxx-Release
one will have an emptydebug
.But this is a different issue from deployment.
Are you able to run your application successfully from Qt creator before having called windeployqt.exe? -
@Bonnie said in Deployed exe not working on same computer:
Both will have
debug
andrelease
subfolders in them, but thebuild-xxx-Debug
one will have an emptyrelease
and thebuild-xxx-Release
one will have an emptydebug
.Exactly. I have two folders -
build-xxx-Debug
andbuild-xxx-Release
, but both of them have executables indebug
and emptyrelease
Are you able to run your application successfully from Qt creator before having called windeployqt.exe?
Yes, it compiles and runs without problems
@JKSH said in Deployed exe not working on same computer:
- If you create a new "Hello world" app, can you get a Release build to appear in the
release
folder? - If "Yes" to #1, can you deploy that app and run it?
I took an example and made a release version. It created executable in
release
and I could deploy and run it. I have compared Release Build Settings from the example and from my project - they are equal.- What external libraries (if any) are used by your project?
I don't use external libraries
- If your project uses Qt Quick/QML, did you deploy the QML files (including
qmldir
)? See https://wiki.qt.io/Deploy_an_Application_on_Windows
Thanks for this link. I do use Qml and I just tried "quick and dirty" method and it worked! So now I'll have to do the "clean up". Still strange that Release version creates executable in debug directory though
- If you create a new "Hello world" app, can you get a Release build to appear in the
-
@Bonnie said in Deployed exe not working on same computer:
Both will have
debug
andrelease
subfolders in them, but thebuild-xxx-Debug
one will have an emptyrelease
and thebuild-xxx-Release
one will have an emptydebug
.Exactly. I have two folders -
build-xxx-Debug
andbuild-xxx-Release
, but both of them have executables indebug
and emptyrelease
Are you able to run your application successfully from Qt creator before having called windeployqt.exe?
Yes, it compiles and runs without problems
@JKSH said in Deployed exe not working on same computer:
- If you create a new "Hello world" app, can you get a Release build to appear in the
release
folder? - If "Yes" to #1, can you deploy that app and run it?
I took an example and made a release version. It created executable in
release
and I could deploy and run it. I have compared Release Build Settings from the example and from my project - they are equal.- What external libraries (if any) are used by your project?
I don't use external libraries
- If your project uses Qt Quick/QML, did you deploy the QML files (including
qmldir
)? See https://wiki.qt.io/Deploy_an_Application_on_Windows
Thanks for this link. I do use Qml and I just tried "quick and dirty" method and it worked! So now I'll have to do the "clean up". Still strange that Release version creates executable in debug directory though
@PavloPonomarov said in Deployed exe not working on same computer:
I do use Qml and I just tried "quick and dirty" method and it worked!
Awesome :)
You were probably missing QML-related files.
Try the
--qmldir
and--qmlimport
options of windeployqt - If you create a new "Hello world" app, can you get a Release build to appear in the