Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. error: 'QtInfoMsg' was not declared in this scope
Forum Update on Monday, May 27th 2025

error: 'QtInfoMsg' was not declared in this scope

Scheduled Pinned Locked Moved Solved Installation and Deployment
3 Posts 2 Posters 2.3k 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.
  • B Offline
    B Offline
    b108463
    wrote on last edited by
    #1

    Dear all,
    I try to use another Qt version (Note1) to test my project again. This time I have another problem (Note2). But It's ok for qt-opensource-linux-x64-5.6.0.run, qt-opensource-linux-x64-5.6.2 and qt-opensource-linux-x64-5.7.0
    Could you give me some suggestions? Thanks a lot.
    I have already tried to google some information. Until now,I could not find the solution.

    Note1:

    1. use apt-get install qt5-default qtcreator -y
      => qt-creator verision:2.8.84 based on Qt5.2.0
      2.g++ version : g++-4.8 (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)

    Note2:
    g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE -DDEBUG_MODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I../SMPCodeReader1 -I../bardecoder_8_1_1/include -I/home/ubuntu/bardecoder_8_1_1/include/harfbuzz -I/usr/include -I../SMPCodeReader1/src/uEye/amd64 -I/usr/include/qt5 -I/usr/include/qt5/QtMultimedia -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -I. -o main.o ../SMPCodeReader1/main.cpp
    ../SMPCodeReader1/main.cpp: In function 'void myMessageOutput(QtMsgType, const QMessageLogContext&, const QString&)':
    ../SMPCodeReader1/main.cpp:18:14: error: 'QtInfoMsg' was not declared in this scope
    case QtInfoMsg:
    ^
    make: *** [main.o] Error 1

    1 Reply Last reply
    0
    • SGaistS SGaist

      Hi,

      QtInfoMessage was added in Qt 5.5. See here.

      B Offline
      B Offline
      b108463
      wrote on last edited by
      #3

      @SGaist HI,thanks. I think it's my problem of working environment. Now it's fixed. Thanks.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        QtInfoMessage was added in Qt 5.5. See here.

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

        B 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          QtInfoMessage was added in Qt 5.5. See here.

          B Offline
          B Offline
          b108463
          wrote on last edited by
          #3

          @SGaist HI,thanks. I think it's my problem of working environment. Now it's fixed. Thanks.

          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