Results 1 to 20 of 24

Thread: Error : undefined reference to `vtable for MyClass'

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Error : undefined reference to `vtable for MyClass'

    Quote Originally Posted by joseph View Post
    Qt Code:
    1. headerFooterOptions.h:0: Warning: No relevant classes found. No output generated.
    To copy to clipboard, switch view to plain text mode 
    I can't spot the reason, but for some reason moc does not like the class declaration in headerFooterOptions.h. The only fault I can spot is an extra "\" at the end of FORMS variable in the .pro file.
    J-P Nurmi

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

    Default Re: Error : undefined reference to `vtable for MyClass'

    joseph: what happens if you run manually moc on headerFooterOptions.h?
    Does it create a moc then, or does the error repeat ti self?
    ==========================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. #3
    Join Date
    Aug 2006
    Posts
    26
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error : undefined reference to `vtable for MyClass'

    Hey Joseph,

    You have ChemCanvas in your constructor, do you need to include chemcanvas.h?
    "And no one said 'don't use QPrinter to bake muffins'."

Similar Threads

  1. error undefined reference ...............
    By amit_pansuria in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2007, 15:28
  2. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 20:15
  3. Strange error while using Q3Canvas
    By Kapil in forum Newbie
    Replies: 13
    Last Post: 15th June 2006, 20:36
  4. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 9th March 2006, 00:11
  5. Linker Errors
    By MarkoSan in forum Qt Programming
    Replies: 5
    Last Post: 7th March 2006, 19:30

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.