Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Debugging with QTCreator

    Tools
    2
    3
    746
    Loading More Posts
    • 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.
    • ccx004
      ccx004 last edited by

      Hi All,

      I've just built QT 5.7.1 and QTCreator 4.2.0 from sources and created my "Hello World" program just to make sure everything was okay. When I tried to build it, I had an error about some DLLs being missing such as QT5Cored.dll. I realised that I had only built a release version of qt and hence the error. Sure enough a release version of my little program built and ran fine. However, it struck me as odd that in order to debug my 5 line program (including blank lines) I need to also be able to debug all of Qt so I took the LIBS= line from Makefile.release and replaced the LIBS= line in Makefile.debug with it. My little program them built happily using that Makefile and I could debug it from within QTCreator quite happily as well. Obviously I can't debug the Qt libraries but lets be honest: If I write a program and there is a bug the chances are it will be in my code and not in the Qt code so I wondered is there any way to get QTCreator to build a debugging version of my code but use the release versions of libraries such as Qt. I did go through all the options in QTCreator but didn't see anything that seemed to do that. I guess I could add a LIBS = line to the project file but what libraries would need to be included? On a large project there could be a lot.

      Anyway, if anyone knows of a way to just debug the code I write and not the Qt code when using QTCreator I would be very grateful if they could let me know.

      Best wishes...
      Colin Bruce

      ccx004 1 Reply Last reply Reply Quote 0
      • ccx004
        ccx004 @ccx004 last edited by

        Oh well, 5 months on, a new version of Qt (5.8.0) and QTCreator (4.3.0) and no replies. I guess having to debug Qt as well as my little programs is the way it is. It also means I need to install several GB of libraries that I will never actually step through just to debug my little libraries. I don't think this is a sensible design feature but then again; what do I know?

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          That's a question you can bring to the Qt Creator mailing list. You'll find there Qt Creator's developers/maintainers. This forum is more user oriented.

          On a side note, it's pretty unusual to build both Qt Creator and Qt to start development. Most people either use the pre-built package using the online/offline installers or if on Linux, their distribution provided Qt. Why that path ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 1
          • First post
            Last post