Crash when run in Release mode?
-
Excellent. If you like, you can create a variable in your .pro file for your directory that contains the libraries, and use that variable when specifying the target.files. Won't change the behavior; it's just a bit cleaner.
If you think this is resolved, please mark the topic as solves using the topic tools available in your first post in this thread.
-
@SGaist said in Crash when run in Release mode?:
@Mucip That is something that you can find out in the release notes as well as in the git history.
But whatever the differences are, I seriously doubt they have anything to do with the problem you encountered. More likely, when you updated, you also created a new .user file that wiped out your build settings.
-
Hi @mzimmers ,
Let's suppose there is report folder in the main project directory and some xml files in this report directory. I want to copy report folder and contents to the target directory too. Above information I can copy files to target but what about create folder and copy files to target directory on compile time?Regards,
Mucip:) -
@mzimmers ,
I got it thanks.
Maybe someone has same problem. I solved like below.
The code create "rapor" folder and copies contents to target build directory.target.path = $$OUT_PWD/release target.files = "D:/Belgeler/Qt/LimeReport/win64/release/lib/LimeReport.dll" "D:/Belgeler/Qt/LimeReport/win64/release/lib/QtZint.dll" $$PWD/rapor INSTALLS += target
Regards,
Mucip:) -
@Mucip said in Crash when run in Release mode?:
If some DLL are missing It shouldn't compile the project, should it?
If they are missing at compile time then yes it will not compile.
But in your case they are missing at runtime.
QtCreator prepares the environment before starting your app, so it can find all libraries.
If you want to start your app outside of Qt creator you need to deploy it first: https://doc.qt.io/qt-5/windows-deployment.html -
-
If the above tips haven't helped, here's another: I had a bug in a function that should have returned a bool (but returned nothing) that caused the project release version to crash while the debug version ran OK. After adding the missing line of code both versions ran.
Regards,
theldl