Results 1 to 12 of 12

Thread: Mingw integration

  1. #1
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Mingw integration

    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?

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Mingw integration

    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.

  3. #3
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    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

  4. #4
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    Check this tutorial, and make sure you apply step 9.

  5. #5
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    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

  6. #6
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    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?

  7. #7
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    That would good - thanks
    Graham

  8. #8
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    First of all, remove everything you already have (Qt SDK, eclipse, MinGW, any edits to environment Variable(s), etc. )

    Now follow these steps:
    1. Download and unpack Eclipse IDE for C/C++ Developers to C:\eclipse
    2. 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
    3. Download and install the GDB, keeping all options default
    4. 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
    5. Prepend (Not Append) C:\msys\1.0\bin;C:\mingw\bin; to the PATH Environment Variable
    6. Download and install Qt SDK also in the default directory.
    7. Download and install Qt Eclipse Integration for C++, all default
    8. 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)
    9. 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
    10. Reboot your computer
    11. 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

  9. #9
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    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:
    1. 33-gdb-set confirm off
    2. 33^done
    3. (gdb)
    4. 34-gdb-set width 0
    5. 34^done
    6. (gdb)
    7. 35-gdb-set height 0
    8. 35^done
    9. (gdb)
    10. 36-interpreter-exec console echo
    11. 36^error,msg="Undefined MI command: interpreter-exec"
    12. (gdb)
    13. 37-gdb-show prompt
    14. 37^done,value="(gdb) "
    15. (gdb)
    16. 38
    17. &"\n"
    18. 38^done
    19. (gdb)
    20. 39-gdb-set stop-on-solib-events 0
    21. 39^done
    22. (gdb)
    23. 40-gdb-set stop-on-solib-events 1
    24. 40^done
    25. (gdb)
    26. 41-gdb-set new-console off
    27. 41^done
    28. (gdb)
    29. 42-environment-cd C:\\workspace\\TestQt
    30. 42^done
    31. (gdb)
    32.  
    33. 43-environment-directory C:/workspace/TestQt C:/workspace/TestQt/debug C:/workspace/TestQt/release
    34. 43^done
    35. (gdb)
    36. 44 info threads
    37. &"info threads\n"
    38. &"No stack.\n"
    39. 44^error,msg="No stack."
    40. (gdb)
    41. 45-data-list-register-names
    42. 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"]
    43. (gdb)
    44. 46-break-insert -t main
    45. 46^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00401305",func="main",file="main.cpp",line="10",times="0"}
    46. (gdb)
    47. 47-exec-run
    48. 47^running
    49. (gdb)
    50. 48-gdb-exit
    To copy to clipboard, switch view to plain text mode 

  10. #10
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    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:
    1. 33-gdb-set confirm off
    2. 33^done
    3. (gdb)
    4. 34-gdb-set width 0
    5. 34^done
    6. (gdb)
    7. 35-gdb-set height 0
    8. 35^done
    9. (gdb)
    10. 36-interpreter-exec console echo
    11. 36^error,msg="Undefined MI command: interpreter-exec"
    12. (gdb)
    13. 37-gdb-show prompt
    14. 37^done,value="(gdb) "
    15. (gdb)
    16. 38
    17. &"\n"
    18. 38^done
    19. (gdb)
    20. 39-gdb-set stop-on-solib-events 0
    21. 39^done
    22. (gdb)
    23. 40-gdb-set stop-on-solib-events 1
    24. 40^done
    25. (gdb)
    26. 41-gdb-set new-console off
    27. 41^done
    28. (gdb)
    29. 42-environment-cd C:\\workspace\\TestQt
    30. 42^done
    31. (gdb)
    32.  
    33. 43-environment-directory C:/workspace/TestQt C:/workspace/TestQt/debug C:/workspace/TestQt/release
    34. 43^done
    35. (gdb)
    36. 44 info threads
    37. &"info threads\n"
    38. &"No stack.\n"
    39. 44^error,msg="No stack."
    40. (gdb)
    41. 45-data-list-register-names
    42. 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"]
    43. (gdb)
    44. 46-break-insert -t main
    45. 46^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00401305",func="main",file="main.cpp",line="10",times="0"}
    46. (gdb)
    47. 47-exec-run
    48. 47^running
    49. (gdb)
    50. 48-gdb-exit
    To copy to clipboard, switch view to plain text mode 

  11. #11
    Join Date
    Mar 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    OK I solved it - you need to set the Qt version in the Qt section of project properties

    Thanks for your help

    Graham

  12. #12
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mingw integration

    I mentioned that you should setup Qt version (step 9)...

    Anyway, Good for you.

Similar Threads

  1. A Guide to Install MinGW, Qt4 and Eclipse Integration on Windows XP
    By shiyutang in forum Installation and Deployment
    Replies: 10
    Last Post: 5th August 2009, 04:03
  2. Eclipse Integration sans Integration
    By ChrisW67 in forum Qt Tools
    Replies: 3
    Last Post: 17th March 2009, 07:29
  3. using the qt 4.4.0 evaluation version with MinGw
    By dano in forum Installation and Deployment
    Replies: 4
    Last Post: 4th July 2008, 16:02
  4. Qt + boost + MinGW on Windows
    By akos.maroy in forum Newbie
    Replies: 3
    Last Post: 12th June 2008, 14:53
  5. Windows COM integration in MinGW Qt
    By Doug Broadwell in forum Qt Programming
    Replies: 1
    Last Post: 28th March 2008, 04:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.