Results 1 to 4 of 4

Thread: opengl problem

  1. #1
    Join Date
    Nov 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default opengl problem

    hi all,

    i am trying to build the example "helloGL" but when building it is giving me these errors.

    Qt Code:
    1. /home/adrian/Qdevelop/opengl/glwidget.cpp:176: undefined reference to `QGLWidget::qglColor(QColor const&) const'
    2. /home/adrian/Qdevelop/opengl/glwidget.cpp:178: undefined reference to `glVertex3d'
    3. /home/adrian/Qdevelop/opengl/glwidget.cpp:179: undefined reference to `glVertex3d'
    4.  
    5. glwidget.o: In function `GLWidget::resizeGL(int, int)':
    6. /home/adrian/Qdevelop/opengl/glwidget.cpp:90: undefined reference to `glViewport'
    7. /home/adrian/Qdevelop/opengl/glwidget.cpp:92: undefined reference to `glMatrixMode'
    8. /home/adrian/Qdevelop/opengl/glwidget.cpp:93: undefined reference to `glLoadIdentity'
    9. /home/adrian/Qdevelop/opengl/glwidget.cpp:94: undefined reference to `glOrtho'
    10. /home/adrian/Qdevelop/opengl/glwidget.cpp:95: undefined reference to `glMatrixMode'
    11. /home/adrian/Qdevelop/opengl/glwidget.cpp:78: undefined reference to `glClear'
    12. /home/adrian/Qdevelop/opengl/glwidget.cpp:79: undefined reference to `glLoadIdentity'
    13. /home/adrian/Qdevelop/opengl/glwidget.cpp:80: undefined reference to `glTranslated'
    14. /home/adrian/Qdevelop/opengl/glwidget.cpp:81: undefined reference to `glRotated'
    15. /home/adrian/Qdevelop/opengl/glwidget.cpp:82: undefined reference to `glRotated'
    16. /home/adrian/Qdevelop/opengl/glwidget.cpp:83: undefined reference to `glRotated'
    17. /home/adrian/Qdevelop/opengl/glwidget.cpp:24: undefined reference to `glDeleteLists'
    To copy to clipboard, switch view to plain text mode 

    etc etc......

    i have already pointed to QtOpenGl folder.
    any ideas??
    thanks

    adrian

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: opengl problem

    Did you use qmake && make to compile it? Didn't you by any chance overwrite the project file? Do you have OpenGL libraries installed on your machine?

  3. #3
    Join Date
    Jan 2006
    Location
    Berlin, Germany
    Posts
    64
    Thanks
    1
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Red face Re: opengl problem

    I had this once a couple days and banged my head on the desk for 30 minutes then realized in my .pro file I had put Qt += opengl instead of QT += opengl
    Katrina Niolet

  4. #4
    Join Date
    Nov 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: opengl problem

    hey katrina thanks, that was my problem also........

Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 19:04
  2. OpenGL rendering problem
    By spud in forum Qt Programming
    Replies: 5
    Last Post: 27th February 2007, 20:44
  3. OpenGL glGet problem
    By Cloudy in forum General Programming
    Replies: 1
    Last Post: 27th December 2006, 00:10
  4. basic qt opengl problem
    By kingslee in forum Qt Programming
    Replies: 4
    Last Post: 12th November 2006, 16:26
  5. Qt 4.2.0 OpenGL problem
    By mbjerkne in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2006, 19:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.