Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't Set QT_DEBUG Flag

Can't Set QT_DEBUG Flag

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.1k 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.
  • D Offline
    D Offline
    DougyDrumz2
    wrote on last edited by
    #1

    I'm creating a Qt 6.1.2 app in Windows 10. I've created several Qt apps in Linux. The default setting in LINUX for debug is QT_DEBUG. Evidently this is not the case in Qt 6.1.2 for Windows 10 - it's QT_NO_DEBUG. I'm using cmake and make to build. I've tried everything I can think of in CMakeLists.txt. I even tried changing instances of QT_DEBUG in the QT6.1.2 distribution. How do I get QT_DEBUG set for my build (other than somehow hardcoding it)?

    1 Reply Last reply
    0
    • AxelViennaA Offline
      AxelViennaA Offline
      AxelVienna
      wrote on last edited by
      #2

      @DougyDrumz2
      I can only guess that this is a local configuration issue, since I have seen the debugger working flawlessly with QT_DEBUG under Windows 10 / Qt 6.1.2 / cmake.
      Please check and/or share your project's build settings for the debug configuration and your .pro file.

      C++ and Python walk into a bar. C++ reuses the first glass.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DougyDrumz2
        wrote on last edited by
        #3

        I don't have a *.pro file. I did using linux. However, in linux, I didn't have to set a CONFIG statement to turn on QT_DEBUG, just to turn it off. I'm doing everything via my CMakeLists.txt file. And everything but debug works. Is that feasible, or do I have to have a *.pro file?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What do you create from your CMakeLists.txt - a Makefile or a Visual Studio Solution? If you create Makefile then your CMAKE_BUILD_TYPE must be properly set to either Debug or RelWithDebInfo

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DougyDrumz2
            wrote on last edited by
            #5

            That didn't work for me either. The only time I see my qDebug() messages is when I run my app in gdb.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DougyDrumz2
              wrote on last edited by
              #6

              I looked up Debug and RelWithDebInfo. They add debug symbols to the code. That's not what I'm referring to here. I just want to use qDebug() to output error messages.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DougyDrumz2
                wrote on last edited by
                #7

                I've even tried hardcoding every instance of QT_NO_DEBUG to QT_DEBUG. No luck. The only time I see the my qDebug() messages is when I run in gdb.

                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