Results 1 to 6 of 6

Thread: undefined reference to 'vtable ...'

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: undefined reference to 'vtable ...'

    Also, make sure you've added both the header and the implementation files to your .pro file.

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: undefined reference to 'vtable ...'

    try cleaning the project, remove debug/release folders, remove the makefiles and the .pro.user file, then open the project again and rebuild.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: undefined reference to 'vtable ...'

    You need to provide the implementations for two virtual functions (one pure) you declare:
    Qt Code:
    1. QRectF boundingRect() const;
    2. QPainterPath shape() const;
    To copy to clipboard, switch view to plain text mode 
    and the error goes away.

  4. The following user says thank you to ChrisW67 for this useful post:

    GUIman (10th March 2011)

  5. #4
    Join Date
    Feb 2011
    Posts
    9
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: undefined reference to 'vtable ...'

    Thank you very much... I am an idiot

Similar Threads

  1. Qt Undefined Reference to vtable
    By ctote in forum Qt Programming
    Replies: 18
    Last Post: 24th February 2010, 22:24
  2. undefined reference to vtable in Threads.
    By prasanth.nvs in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 20th February 2009, 10:19
  3. Undefined reference to 'vtable for XXX'
    By Sheng in forum Qt Programming
    Replies: 4
    Last Post: 17th October 2008, 15:59
  4. undefined reference to vtable
    By renjithmamman in forum Qt Programming
    Replies: 5
    Last Post: 2nd July 2006, 04:23
  5. Replies: 2
    Last Post: 30th June 2006, 18:42

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.