Author Topic: debugging a Qt4 software  (Read 3680 times)

tutlegrand

  • Guest
debugging a Qt4 software
« on: October 18, 2006, 02:23:58 pm »
Hi all,
I'm using CodeBlocks in order to create a Qt4 software.
compilation, linking, starting are OK.
But I can't manage to launch the debugger.  :?
When I try to launch it, CodeBlocks (or gdb ?) tells me it can't find the qtcore4.dll file, although there's no problem when I launch the software from CodeBlocks.
Is there a specific configuration to do for using share dll ?

I use CodeBlocks with windows XP, mingw and  Qt 4.2.0.
The Qt install dir has been added to the PATH environment variable.

Can you help me please ?

DonSixto

  • Guest
Re: debugging a Qt4 software
« Reply #1 on: October 19, 2006, 04:20:29 pm »
What gdb version do you have ?
When you start a debug session it tells you that in the debugger windows.
I had the same problem when I tried to use the cygwin gdb v 6.5.
Then I tried to use the mingw32 gdb from its installer.
Later I found that installing CodeBlocks with mingw included, and then updating it to a nightly build works fine for debugging.
It seems that gdb 6.5 does not treat well the path variable values. It converts a disk name to /cygdrive/d and then the rest of the path. Anyway, CB does not integrate well with gdb 6.5, and so I'm using the one provided with its installer. With this, I don't have the 'dll not found' problem anymore.
If you still don't find the reason for that problem, you may consider copying the needed dlls from qt4/bin directory to your exe directory; this will work for sure.

Kind regards

Rockeye

  • Guest
Re: debugging a Qt4 software
« Reply #2 on: October 26, 2006, 11:13:30 am »
Unfortunnately, I can't bring you the solution, but I have already debug a QT4+Opengl application without any problems. I am using gdb 6.3.

It may be come from your build option.
Do you have several build target ? You may have forgot to specify some option in the debug target option...