Hello
Please can you help me?
I am using Qt Eclipse integration but cannot get to debug an application
WHen I try I get the following error from the debugger
You can't do that without a process to debug
Does anyone know what this means?
Hello
Please can you help me?
I am using Qt Eclipse integration but cannot get to debug an application
WHen I try I get the following error from the debugger
You can't do that without a process to debug
Does anyone know what this means?
It means that your mingw installation doesn't have gdb in it. You need to download install gdb for win32 (You didn't mention, so i assume that you are on windows).
I'm a rebel in the S.D.G.
I am on windows
I have gdb under the mingw folder in the Qt folder.
If I remove references to Qt objects in my program I can run the debbuger. As soon as I put in the line QCoreApplication a(argc, argv); I can no longer debug
Any other ideas?
Graham
Check this tutorial, and make sure you apply step 9.
Hi
THanks for the reply
I am using QT SDK by Nokia v2009.01 which includes mingw
I ahve set uo the environment as in the tutorial but still cannot debug. I cannot now get the program to run either.
Please help, i am tearing my hair out!!
Graham
Well, I am using the same version "Qt SDK by Nokia v2009.01" with eclipse and everything is working OK.
how about telling you all the steps that I did from scratch to install Qt+Eclipse?
That would good - thanks
Graham
First of all, remove everything you already have (Qt SDK, eclipse, MinGW, any edits to environment Variable(s), etc. )
Now follow these steps:
- Download and unpack Eclipse IDE for C/C++ Developers to C:\eclipse
- Download and run the Automated MinGW Installer, and don't forget to select (in addition to MinGW Tools), MinGW Make and the G++ compiler and install in the default path
- Download and install the GDB, keeping all options default
- Download and install MSYS again keeping all options default, and when the installation ends, you'll see a prompt (in a command line window) then choose yes twice then enter this string as is: c:/mingw
- Prepend (Not Append) C:\msys\1.0\bin;C:\mingw\bin; to the PATH Environment Variable
- Download and install Qt SDK also in the default directory.
- Download and install Qt Eclipse Integration for C++, all default
- Append ;C:\Qt\2009.01\qt\bin to the PATH Environment Variable
Add C:\MinGW\lib;C:\Qt\2009.01\qt\lib to the Lib Environment Variable (if no Lib, please create one)
Add C:\MinGW\include;C:\Qt\2009.01\qt\include to the Include Environment Variable (if no Include, please create one)- Open eclipse and goto: "Preferences -> Qt -> Add", then give these values:
- Version Name: 4.5.0
- Bin Path: C:\Qt\2009.01\qt\bin
- Include Path: C:\Qt\2009.01\qt\include
- Reboot your computer
- Click the bug icon and select "Debug Configurations", add a new configuration in C/C++ Local Application, notice that C/C++ Application should be "debug/*.exe", not "release/*.exe"! Choose the Debugger tab and set Debugger to gdb/mi. And then choose apply.
And, you're done ( finally)
HTH
hello again
I have followed the instructions but still hanve problems
I created a simple application and when I run it or debug it it terminates immediately
the following is the output from gdb. Have you any idea what is goin on?
Qt Code:
33-gdb-set confirm off 33^done (gdb) 34-gdb-set width 0 34^done (gdb) 35-gdb-set height 0 35^done (gdb) 36-interpreter-exec console echo 36^error,msg="Undefined MI command: interpreter-exec" (gdb) 37-gdb-show prompt 37^done,value="(gdb) " (gdb) 38 &"\n" 38^done (gdb) 39-gdb-set stop-on-solib-events 0 39^done (gdb) 40-gdb-set stop-on-solib-events 1 40^done (gdb) 41-gdb-set new-console off 41^done (gdb) 42-environment-cd C:\\workspace\\TestQt 42^done (gdb) 43-environment-directory C:/workspace/TestQt C:/workspace/TestQt/debug C:/workspace/TestQt/release 43^done (gdb) 44 info threads &"info threads\n" &"No stack.\n" 44^error,msg="No stack." (gdb) 45-data-list-register-names 45^done,register-names=["eax","ecx","edx","ebx","esp","ebp","esi","edi","eip","eflags","cs","ss","ds","es","fs","gs","st0","st1","st2","st3","st4","st5","st6","st7","fctrl","fstat","ftag","fiseg","fioff","foseg","fooff","fop"] (gdb) 46-break-insert -t main 46^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00401305",func="main",file="main.cpp",line="10",times="0"} (gdb) 47-exec-run 47^running (gdb) 48-gdb-exitTo copy to clipboard, switch view to plain text mode
hello again
I have followed the instructions but still hanve problems
I created a simple application and when I run it or debug it it terminates immediately
the following is the output from gdb. Have you any idea what is goin on?
Qt Code:
33-gdb-set confirm off 33^done (gdb) 34-gdb-set width 0 34^done (gdb) 35-gdb-set height 0 35^done (gdb) 36-interpreter-exec console echo 36^error,msg="Undefined MI command: interpreter-exec" (gdb) 37-gdb-show prompt 37^done,value="(gdb) " (gdb) 38 &"\n" 38^done (gdb) 39-gdb-set stop-on-solib-events 0 39^done (gdb) 40-gdb-set stop-on-solib-events 1 40^done (gdb) 41-gdb-set new-console off 41^done (gdb) 42-environment-cd C:\\workspace\\TestQt 42^done (gdb) 43-environment-directory C:/workspace/TestQt C:/workspace/TestQt/debug C:/workspace/TestQt/release 43^done (gdb) 44 info threads &"info threads\n" &"No stack.\n" 44^error,msg="No stack." (gdb) 45-data-list-register-names 45^done,register-names=["eax","ecx","edx","ebx","esp","ebp","esi","edi","eip","eflags","cs","ss","ds","es","fs","gs","st0","st1","st2","st3","st4","st5","st6","st7","fctrl","fstat","ftag","fiseg","fioff","foseg","fooff","fop"] (gdb) 46-break-insert -t main 46^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00401305",func="main",file="main.cpp",line="10",times="0"} (gdb) 47-exec-run 47^running (gdb) 48-gdb-exitTo copy to clipboard, switch view to plain text mode
OK I solved it - you need to set the Qt version in the Qt section of project properties
Thanks for your help
Graham
I mentioned that you should setup Qt version (step 9)...
Anyway, Good for you.
Bookmarks