Good practice to debug an application
-
Hi all,
I have been given a code using qwt and one other library. The code has been provided as examples by the developer of the second library (which you have to buy).
When I try to recompile the code, I do not get any error (only some warnings) but when I try to run the application from QtCreator, I have the following error:
The program has unexpectedly finished. The process was ended forcefully.
The awarning are about deprecated use of QtFlags or something similar, could it matter?
I have nothing more than that.To find out what is the problem I have been compiling examples from the qwt library and it worked well. So I suppose that the qwt installation is not the problem. When I try to run the executable of the example I want to compile (the .exe files are also provided) it also work.
I coped all libraries and dll in the folder where I build the application, but I suppose I would have another kind of problem if it was due to a missing library.Any idea on how to approach this problem and debug that? How to start?
Thanks for your advices,
Thombou -
@Thombou said in Good practice to dedug an application:
Any idea on how to approach this problem and debug that?
Start the app (debug build) in QtCreator and check the stack trace when it is terminated.
-
@Thombou said in Good practice to dedug an application:
I coped all libraries and dll in the folder where I build the application, but I suppose I would have another kind of problem if it was due to a missing library.
Are you running in windows?
If yes, this is exactly what will happen when missing any dynamic library (dll).
Double clicking the exe will tell you which ones are missing. -
Hi,
It was indeed a missing DLL plus some conflicts with the DLL I copied from the example directory. The DLL copied from the example provided with the code were not compatible with the version of qwt I was using.
Using the dependency walker helped me to figure it out.
Thanks everybody!