Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Cannot debug using eclipse with mingw
QtWS25 Last Chance

Cannot debug using eclipse with mingw

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 6.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxmotor
    wrote on last edited by
    #1

    When I try to debug my program I get:

    'no source available for "main()"'

    As the headline states I'm using Eclipse with mingw.

    So far I've been developing without being able to use the debug view.
    This is of course not optimal.

    Do you have any experience with this? Or do you just have an idea what it could be?

    Thank you for your time!

    EDIT: By the way - in my debug window, I see that my application was terminated with this:

    <terminated> MinGW gdb ... (Exited. Exit code = 0.)
    <terminated, exit value: 0>C:\MinGW\bin\gdb.exe
    <terminated, exit value: 0>D:\MyWorkspace\MyApplication\debug\myApplication.exe

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maxmotor
      wrote on last edited by
      #2

      I just got a new computer, and I'm trying to make a fresh installation of my development environment. The goal is to be able to develop Qt applications in Eclipse.

      When I install Qt OpenSource 4.7.4, I get a notification saying that the installed MinGW version is not supported.

      I've tried to ignore this and finish the installation. I am still not able to debug after this. Could this be caused by the versions not matching?

      I am now trying to reinstall Qt OpenSource 4.7.4. I have also changed MinGW to the supported version (I'm not 100 % sure that I did it correctly. I downloaded from:
      http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-3.13/ . Here I got 2 folders "include" and "lib". I moved them to the MinGW folder overwriting the "old" files).
      Now I get a new notification saying that the "g++ version found does not match 4.4.0 (Found version 4.6.1)"

      As mentioned I'm not sure this has anything to do with me not being able to debug my Qt application in Eclipse.

      Do you have a suggestion?

      Thank you for your time!

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maxmotor
        wrote on last edited by
        #3

        I could really use some help :(

        I started over again. I installed:

        Eclipse 20110916-0149 Indigo
        CDT 8.0.1 for Eclipse Indigo (TCF was not installed)
        MinGW 4.5.2
        Qt OpenSource 4.7.4
        Qt Eclipse Integration 1.6.1

        FYI I'm running on windows 7 32 bit.

        When using Qt Creator, I am able to debug. It seems to be working as intended. Yes, I know that you might think "then just use that instead of Eclipse", but it bothers me that I can't get it to work. I like working in Eclipse and would like to stay there.

        Thank you for your time!

        1 Reply Last reply
        0
        • U Offline
          U Offline
          Uwe Kindler
          wrote on last edited by
          #4

          Sorry to say that, but forget about debugging Qt applications with eclipse. We use eclipse + MinGW for more than 2 years for Qt development but for debugging we always launch QtCreator. I know, it is not a perfect solution, but the QtCreator debugger is so much better than the eclipse DSF debugger for the following reasons:

          1. it simply works
          2. startup of a debugging session is much faster than in eclipse (especially if you work with a lot of DLLs)
          3. it is not possible in eclipse to set breakpoints in DLLs before they are loaded
          4. it is not possible in eclipse to interrupt a running Qt application from the debugger
          5. QtCreator supports pretty printing of a lot of Qt data types that makes debugging much more eficcient

          Because QtCreator only needs the projects .pro file it is quite easy to share a project between eclipse and QtCreator. And starting up QtCreator and launching a debug session is much faster than simply launching a debug session in eclipse (for large projects).

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxmotor
            wrote on last edited by
            #5

            Thank you for your reply Uwe!

            I guess I will do as you suggest.

            it would be nice to be able to stick to only one IDE, but this will have to do :)

            thank you once again.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved