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. Why i am gettting error: 'QtMsgHandler' does not name a type' ?

Why i am gettting error: 'QtMsgHandler' does not name a type' ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 539 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.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by Qt embedded developer
    #1

    when i include log4Qt library in qt and build project at that time i am getting below error

    /home/log4qt/logmanager.h:267: error: 'QtMsgHandler' does not name a type
    QtMsgHandler mOldQtMsgHandler;
    ^

    Is there any solution is there for this error in qt 5.5.1 ?

    jsulmJ 1 Reply Last reply
    0
    • Q Qt embedded developer

      when i include log4Qt library in qt and build project at that time i am getting below error

      /home/log4qt/logmanager.h:267: error: 'QtMsgHandler' does not name a type
      QtMsgHandler mOldQtMsgHandler;
      ^

      Is there any solution is there for this error in qt 5.5.1 ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Qt-embedded-developer What log4Qt version do you use? In master branch there is no such line in logmanager.h

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      Q 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Qt-embedded-developer What log4Qt version do you use? In master branch there is no such line in logmanager.h

        Q Offline
        Q Offline
        Qt embedded developer
        wrote on last edited by
        #3

        @jsulm

        Thanks for reply.

        i actually don't know version of it. i have downloaded this from sourceforge site.

        can you refer me site for latest version of log4qt library download ?

        jsulmJ 1 Reply Last reply
        0
        • Q Qt embedded developer

          @jsulm

          Thanks for reply.

          i actually don't know version of it. i have downloaded this from sourceforge site.

          can you refer me site for latest version of log4qt library download ?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Qt-embedded-developer https://github.com/MEONMedical/Log4Qt

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Q 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Qt-embedded-developer https://github.com/MEONMedical/Log4Qt

            Q Offline
            Q Offline
            Qt embedded developer
            wrote on last edited by
            #5

            @jsulm Sorry for earlier i mentioned my qt version is 5.12.

            Actually My qt version is 5.5.1. and so i get 2 error :

            /home/src/log4qt/log4qt.h:463: error: #error "Log4Qt requires Qt version 5.12.0 or higher"

            error "Log4Qt requires Qt version 5.12.0 or higher"

            To resolve this error when i comment below part of code

            #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
            #   error "Log4Qt requires Qt version 5.12.0 or higher"
            #endif
            

            i get another error

            /home/mangal/WORK_SOFTRONICS/Project/24JULY21/LZ-50/trunk/Log4Qt/src/log4qt/logmanager.h:279: error: 'QVersionNumber' does not name a type
            static QVersionNumber versionNumber();
            ^
            QVersionNumber

            What is solution for this issue ?

            jsulmJ 1 Reply Last reply
            0
            • Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Qt-embedded-developer said in Why i am gettting error: 'QtMsgHandler' does not name a type' ?:

              error "Log4Qt requires Qt version 5.12.0 or higher"
              to resolve this error when i comment below part of code

              And you really think the message is there for no reason??

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

              Q 1 Reply Last reply
              1
              • Q Qt embedded developer

                @jsulm Sorry for earlier i mentioned my qt version is 5.12.

                Actually My qt version is 5.5.1. and so i get 2 error :

                /home/src/log4qt/log4qt.h:463: error: #error "Log4Qt requires Qt version 5.12.0 or higher"

                error "Log4Qt requires Qt version 5.12.0 or higher"

                To resolve this error when i comment below part of code

                #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
                #   error "Log4Qt requires Qt version 5.12.0 or higher"
                #endif
                

                i get another error

                /home/mangal/WORK_SOFTRONICS/Project/24JULY21/LZ-50/trunk/Log4Qt/src/log4qt/logmanager.h:279: error: 'QVersionNumber' does not name a type
                static QVersionNumber versionNumber();
                ^
                QVersionNumber

                What is solution for this issue ?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Qt-embedded-developer Please take time to read the link I provided, you will find this there:
                "Minimum Qt version required Qt5.12 (for support of Qt versions down to 5.3 use branch 1.4 or the lates 1.4.x release or for support of Qt versions down to 5.7 use branch 1.5 or the lates 1.5.x release)".
                So, if you want to use your old Qt version then use Log4Qt version 1.4 (checkout branch 1.4).

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                Q 1 Reply Last reply
                2
                • Christian EhrlicherC Christian Ehrlicher

                  @Qt-embedded-developer said in Why i am gettting error: 'QtMsgHandler' does not name a type' ?:

                  error "Log4Qt requires Qt version 5.12.0 or higher"
                  to resolve this error when i comment below part of code

                  And you really think the message is there for no reason??

                  Q Offline
                  Q Offline
                  Qt embedded developer
                  wrote on last edited by
                  #8

                  @Christian-Ehrlicher Sorry for trying that.

                  1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Qt-embedded-developer Please take time to read the link I provided, you will find this there:
                    "Minimum Qt version required Qt5.12 (for support of Qt versions down to 5.3 use branch 1.4 or the lates 1.4.x release or for support of Qt versions down to 5.7 use branch 1.5 or the lates 1.5.x release)".
                    So, if you want to use your old Qt version then use Log4Qt version 1.4 (checkout branch 1.4).

                    Q Offline
                    Q Offline
                    Qt embedded developer
                    wrote on last edited by
                    #9
                    This post is deleted!
                    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