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. virt-specifiers in ‘nativeEventFilter’ not allowed outside a class definition # define Q_DECL_OVERRIDE override
Forum Updated to NodeBB v4.3 + New Features

virt-specifiers in ‘nativeEventFilter’ not allowed outside a class definition # define Q_DECL_OVERRIDE override

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 2 Posters 1.6k Views 2 Watching
  • 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.
  • P Offline
    P Offline
    prashant.qt.developer
    wrote on last edited by
    #1

    While compiling an example provided in Genlogic 3.7 the above mentioned error is displayed. I have already compiled this program in centos with Qt 5.9.1 but in ubuntu 16.04.05 this error appears.

    P 1 Reply Last reply
    0
    • P Offline
      P Offline
      prashant.qt.developer
      wrote on last edited by
      #4

      I solved the problem. Actually this is the linker error. Some required libraries were missing, so I added them as per the Readme document of the GLG toolkit(for C++).
      I installed the compatible GLG program and in .pro file of Qt program the library path was properly included as :
      INCLUDEPATH += . /opt/glg3.7/include #comment (this line includes the header files)
      LIBS = -L/opt/glg3.7/lib -lglg_x11 -lglg_map_stub
      -lXt -lX11 -ljpeg -lpng -lz -ldl -lXft -lfontconfig -lfreetype #comment (-L includes the library folder and -l include the libraries itself)

      1 Reply Last reply
      1
      • P prashant.qt.developer

        While compiling an example provided in Genlogic 3.7 the above mentioned error is displayed. I have already compiled this program in centos with Qt 5.9.1 but in ubuntu 16.04.05 this error appears.

        P Offline
        P Offline
        prashant.qt.developer
        wrote on last edited by
        #2

        @prashant.qt.developer
        The full error is mentioned below
        In file included from ../../../Qt5.9.1/5.9.1/gcc_64/include/QtCore/qglobal.h:98:0,
        from ../../../Qt5.9.1/5.9.1/gcc_64/include/QtGui/qtguiglobal.h:43,
        from ../../../Qt5.9.1/5.9.1/gcc_64/include/QtWidgets/qtwidgetsglobal.h:43,
        from ../../../Qt5.9.1/5.9.1/gcc_64/include/QtWidgets/qapplication.h:43,
        from ../../../Qt5.9.1/5.9.1/gcc_64/include/QtWidgets/QApplication:1,
        from ../qt_5x_glg/QGlgApplication.h:2,
        from ../qt_5x_glg/QGlgApplication.cpp:2:
        ../../../Qt5.9.1/5.9.1/gcc_64/include/QtCore/qcompilerdetection.h:1140:26: error: virt-specifiers in ‘nativeEventFilter’ not allowed outside a class definition

        define Q_DECL_OVERRIDE override

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

          Hi and welcome to devnet,

          What does QGlgApplication.h contain ?
          What compiler are you using ?

          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
          0
          • P Offline
            P Offline
            prashant.qt.developer
            wrote on last edited by
            #4

            I solved the problem. Actually this is the linker error. Some required libraries were missing, so I added them as per the Readme document of the GLG toolkit(for C++).
            I installed the compatible GLG program and in .pro file of Qt program the library path was properly included as :
            INCLUDEPATH += . /opt/glg3.7/include #comment (this line includes the header files)
            LIBS = -L/opt/glg3.7/lib -lglg_x11 -lglg_map_stub
            -lXt -lX11 -ljpeg -lpng -lz -ldl -lXft -lfontconfig -lfreetype #comment (-L includes the library folder and -l include the libraries itself)

            1 Reply Last reply
            1

            • Login

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