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. how to include QDebug to my project?
QtWS25 Last Chance

how to include QDebug to my project?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 297 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.
  • J Offline
    J Offline
    JacobNovitsky
    wrote on last edited by
    #1

    TEMPLATE = app
    CONFIG += console c++17
    CONFIG -= app_bundle
    CONFIG -= qt

    QT -= gui
    QT -= core
    QT -= qapplication
    QT += widgets quick

    SOURCES +=
    main.cpp

    /home/supernova/useDll/main.cpp:4: error: QDebug: No such file or directory
    ../useDll/main.cpp:4:10: fatal error: QDebug: No such file or directory
    4 | #include <QDebug>
    | ^~~~~~~~

    Christian EhrlicherC 1 Reply Last reply
    0
    • J JacobNovitsky

      How to ammend my pro file?
      TEMPLATE = app
      CONFIG += console c++17
      CONFIG -= app_bundle
      CONFIG -= qt

      QT += core

      QT += gui
      QT += qapplication
      QT += widgets quick

      SOURCES +=
      main.cpp

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #5

      @JacobNovitsky said in how to include QDebug to my project?:

      CONFIG -= qt

      QT += qapplication

      Nuke these two lines.

      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
      1
      • J JacobNovitsky

        TEMPLATE = app
        CONFIG += console c++17
        CONFIG -= app_bundle
        CONFIG -= qt

        QT -= gui
        QT -= core
        QT -= qapplication
        QT += widgets quick

        SOURCES +=
        main.cpp

        /home/supernova/useDll/main.cpp:4: error: QDebug: No such file or directory
        ../useDll/main.cpp:4:10: fatal error: QDebug: No such file or directory
        4 | #include <QDebug>
        | ^~~~~~~~

        Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        According to the docs QDebug is in QtCore and it tells you that you have to use

        qmake: QT += core

        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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #3

          Hi,

          In addition to @Christian-Ehrlicher, QtQuick depends on QtGui which itself depends on QtCore as well as QWidget depends on QtGui and QtCore.

          Also, why are you disabling Qt in the configuration if you are using it in your project ?

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

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            In addition to @Christian-Ehrlicher, QtQuick depends on QtGui which itself depends on QtCore as well as QWidget depends on QtGui and QtCore.

            Also, why are you disabling Qt in the configuration if you are using it in your project ?

            J Offline
            J Offline
            JacobNovitsky
            wrote on last edited by
            #4

            How to ammend my pro file?
            TEMPLATE = app
            CONFIG += console c++17
            CONFIG -= app_bundle
            CONFIG -= qt

            QT += core

            QT += gui
            QT += qapplication
            QT += widgets quick

            SOURCES +=
            main.cpp

            SGaistS 1 Reply Last reply
            0
            • J JacobNovitsky

              How to ammend my pro file?
              TEMPLATE = app
              CONFIG += console c++17
              CONFIG -= app_bundle
              CONFIG -= qt

              QT += core

              QT += gui
              QT += qapplication
              QT += widgets quick

              SOURCES +=
              main.cpp

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #5

              @JacobNovitsky said in how to include QDebug to my project?:

              CONFIG -= qt

              QT += qapplication

              Nuke these two lines.

              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
              1
              • J JacobNovitsky has marked this topic as solved on

              • Login

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