Unsolved Difference betwee debug and release builds
-
Hi
My project is set to compile with shadow build.
If I compile in debug mode I can run the application from within creator and from the command line (by executing it in the shadow build folder)
However, in release mode I can run from within Qt Creator but not the command line.Please can some explain why this is
Thanks
-
@GrahamLa said in Difference betwee debug and release builds:
However, in release mode I can run from within Qt Creator but not the command line.
Because Creator sets up the PATHs so that all Qt libraries are found for running. If you want to run standalone, you need to deploy your program, e.g. for Windows: https://doc.qt.io/qt-5/windows-deployment.html
-
@aha_1980
Hi thanks
I ran windeployqt for both release and debug versions.
The debug version runs but not the release version
Any Ideas? -
is there any error message shown?
you can try to debug this with Dependency Walker, at least to some degree.
[Edit: fixed typo, thanks @LeLev]
-
@aha_1980
No output of any kind!
Where do I go from here? -
hi @GrahamLa
@aha_1980 said in Difference betwee debug and release builds:
Dependency Walker
[Edit: typo also]
-
Use http://www.dependencywalker.com for debugging.
-
@aha_1980
I have run dependency walker, but it shows no errors -
@GrahamLa That usually means, all directly loaded DLLs are available.
Still there can be some plugins missing, because they are loaded at runtime. Which Qt modules do you use in your program?
-
@aha_1980
My includes#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext>
My Qml imports
import QtQuick 2.9 import QtQuick.Controls 2.5 import QtQuick.Controls 1.4
Its strange that debug works -cant see any differences between the deployment folders
-
Its strange that debug works
It probably finds the missing libs through PATH or an hardcoded path - not sure.
But as you use QML, have you told
windeployqt
about your QML files? How did you call it? -
The problem seems to a misunderstanding on my part
I thought that the --qmldir argument to windeployqt was to point to my qml files, but pointing this at the qt installation qml files makes it work
Thanks everyone -
@GrahamLa That's actually not a misunderstanding
the argument too --qmldir should be the path (absolute) to the folder, where your own qml files are located.
By pointing it to the qt installation it did copy all qml dependencies in your deployment folder and you're probably never going to use the majority of it.