Results 1 to 2 of 2

Thread: unresolved external symbol for QGLWidget

  1. #1
    Join Date
    Aug 2010
    Posts
    65
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default unresolved external symbol for QGLWidget

    I've looked up after this error, but everyone else who's had similar problems seems to have had issues with "child" classes (inheriting from Qt objects) which haven't been put in the .pro file. However, in my case, the error that comes up is pointing at QGLWidget, not at a class that inherits from it. So it's not as if I can add QGLWidget.cpp to the SOURCE list in the .pro file.

    error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void * __thiscall QGLWidget::qt_metacast(char const *)"

    Hints?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: unresolved external symbol for QGLWidget

    you need to add this to your pro file:
    QT += opengl
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    Wasabi (13th May 2011)

Similar Threads

  1. unresolved external symbol with qwt3d
    By pospiech in forum Qt Programming
    Replies: 6
    Last Post: 2nd February 2016, 21:47
  2. unresolved external symbol __imp__GetKeyState@4
    By TriKri in forum Qt Programming
    Replies: 0
    Last Post: 10th May 2010, 11:35
  3. unresolved external symbol
    By gridolfi in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2009, 17:58
  4. unresolved external symbol
    By tgreaves in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2009, 19:49
  5. Unresolved External Symbol
    By munna in forum General Discussion
    Replies: 1
    Last Post: 10th May 2006, 19:25

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.