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. Undefined symbol: _ZTI13QOpenGLWidget when loading my shared lib
QtWS25 Last Chance

Undefined symbol: _ZTI13QOpenGLWidget when loading my shared lib

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.8k 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.
  • X Offline
    X Offline
    XdoctorwhoZ
    wrote on last edited by
    #1

    Hello,

    I am on ubuntu 14.04, Qt5.4
    I am trying to create a shared library with a class derived from QOpenGLWidget.

    The compilation finish with success. But when I load this library (libviewer3d.so) with QLibrary I get an error.

    @libviewer3d.so: undefined symbol: _ZTI13QOpenGLWidget@

    My .pro

    @TARGET = viewer3d

    TEMPLATE = lib

    QT += core gui widgets qml

    CONFIG += c++11 release shared

    unix {
    LIBS += -lGLU -lGL
    }

    SOURCES += src/Viewer.cpp

    HEADERS += src/Viewer.hpp

    INCLUDEPATH += src
    @

    Moreover when I use the Viewer class in an application, like in the example, it works.

    Is-there a flag that I must append in the .pro?

    Thanks for your help.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tarod.net
      wrote on last edited by
      #2

      Try to add in your .pro:

      QT += opengl

      "Individually, we are one drop. Together, we are an ocean."

      1 Reply Last reply
      0
      • X Offline
        X Offline
        XdoctorwhoZ
        wrote on last edited by
        #3

        Thanks for the reply.
        I tried this too but it did not work. ( new QOpenGLWidget does not depend on opengl module )

        I made some tests with new opengl widgets:
        QOpenGLWidget and QOpenGLWindow give me the described error.

        When I made my own opengl window with QWindow and QOpenGLFunctions, it works.
        When I used the old QGLWidget is works too.

        Well I decide to run with QGLWidget again... :-) i going to wait for an improvement of the new classes.

        Thanks again.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tarod.net
          wrote on last edited by
          #4

          Great.

          Take care.

          "Individually, we are one drop. Together, we are an ocean."

          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