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 reference to '_imp__ZN9QGLWidgetC2ERQ9QGLFormat...'
Forum Update on Monday, May 27th 2025

Undefined reference to '_imp__ZN9QGLWidgetC2ERQ9QGLFormat...'

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 3.9k 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.
  • N Offline
    N Offline
    NorskQt
    wrote on last edited by
    #1

    Hi there,

    I just quit MS .NET and started with QT. I was implementing an example from QT's tutorial "hellogl" starting from the scratch. I got the error message shown above + 14 more of them, related to formats and widgets. I searched every possible place to find answer why I have got this error message but I could not find any answer. So here I am! What is causing this error? Any idea?

    I am very surprized that such a small code will create so many error messages.

    Thanks for all the suggestions and help.
    OS : Windows7

    Regards

    1 Reply Last reply
    0
    • O Offline
      O Offline
      Olorin5800
      wrote on last edited by
      #2

      have you added opengl module t your pro file ?


      My programs never have bugs, they just develop random features.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NorskQt
        wrote on last edited by
        #3

        I put this one in the header file :
        #include <QTOpenGL/QGLWidget>

        and the rest of the "Widget" code starts like this and foolows the example with a different name and namespace :

        class QtLogo;

        namespace VisualPresenters
        {

        class Canvas3D : public QGLWidget
        {
        
            Q_OBJECT
        
        public:
            Canvas3D(QWidget* parent = NULL);
        
            ~Canvas3D()
        

        Thanks for the response. Should I need to add more or am I missing something here?

        Regards.

        1 Reply Last reply
        0
        • N Offline
          N Offline
          NorskQt
          wrote on last edited by
          #4

          You are right! I have added

          QT += opengl

          to .pro file and it seems that this part of the problem is solved.

          Thank you!

          1 Reply Last reply
          0
          • O Offline
            O Offline
            Olorin5800
            wrote on last edited by
            #5

            your welcome :D


            My programs never have bugs, they just develop random features.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              stukdev
              wrote on last edited by
              #6

              NorskQt, welcome to the qt forum!
              Please use the @ tag for the source code in your post. thanks.

              1 Reply Last reply
              0
              • N Offline
                N Offline
                NorskQt
                wrote on last edited by
                #7

                OK! Next time I will put @tag to my code snippets.

                Sorry! :o)

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vsorokin
                  wrote on last edited by
                  #8

                  First: Qt is not QT(QuickTime)
                  Second: What do version of Qt you use? May be it was build without opengl support?

                  --
                  Vasiliy

                  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