Results 1 to 2 of 2

Thread: Link error in TV plot example

  1. #1
    Join Date
    Feb 2011
    Posts
    22
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Link error in TV plot example

    Hello all,

    I compiled the tvplot example and i am getting the following error:

    error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)

    Do you have any idea?


    Added after 46 minutes:


    I already found the problem.That's because QwtPlot doesn't inherit QObject.
    Last edited by fantom; 10th March 2011 at 16:29.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Link error in TV plot example

    No - QwtPlot inherits QWidget what inherits QObject.

    The error message is an indication, that the generated moc file has not been compiled and linked against your application. Usually this happens, when you add the Q_OBJECT macro to a class and forget to run qmake to build the rules for the moc files into the makefile.

    Uwe

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

    fantom (17th March 2011)

Similar Threads

  1. Link error
    By emrares in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2010, 13:45
  2. Destructor Link error
    By Roelof in forum Qt Programming
    Replies: 11
    Last Post: 16th September 2009, 11:06
  3. Link error in Windows
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2009, 05:27
  4. qt4.4.2 gui module link error
    By jevonwang in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 9th March 2009, 06:37
  5. moc link error
    By user_mail07 in forum Qt Programming
    Replies: 3
    Last Post: 3rd July 2007, 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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.