Results 1 to 5 of 5

Thread: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMe

  1. #1
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    104
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMe

    Hi, all:

    Environments:
    WindowsXP
    Visual Studio 2008
    Qt 4.6.3
    qwt-5.2.1


    My program used qwt, but I always obtain the following error messages:
    error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
    I definitely linked the released version library qwt5.lib, and the corresponding qwt5.dll is under path.
    (Note, I didn't link the debug version qwt5d.lib, by the way, how to produce the debug version under Windows? The default qwt compilation and building just produce the released version. )

    Also, I noticed the post at
    http://www.archivum.info/qt-interest...ject-quot.html

    It says that
    It turns out the slowest way is the fast way. Problem solved!!! That is in C/C++ compiler | PreProcessor | PreProcessor Definition, which I should have, but I forget a keyword: “QWT_DLL”. With this keyword, the link error is gone!
    However, this doesn't work for me. sad...
    Can anybody give me a hand?

    Cheers
    JIA
    Welcome to Vision Open
    http://www.visionopen.com

  2. #2
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    104
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: unresolved external symbol "public: static struct QMetaObject const QwtPlot::stat

    Problem solved.
    Have to define the preprocessor "QWT_DLL" from the very lowest library that calls qwt.

    Cheers
    Welcome to Vision Open
    http://www.visionopen.com

  3. The following 2 users say thank you to jiapei100 for this useful post:

    MattPhillips (5th March 2014), sampad1370 (9th May 2016)

  4. #3
    Join Date
    Feb 2013
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: unresolved external symbol "public: static struct QMetaObject const QwtPlot::stat

    Thanks. This really helped me too.

  5. #4
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: unresolved external symbol "public: static struct QMetaObject const QwtPlot::stat

    Thanks jiapei100, you saved me a lot of time with your answer!

  6. #5
    Join Date
    Mar 2016
    Posts
    19
    Thanks
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: unresolved external symbol "public: static struct QMetaObject const QwtPlot::stat

    hi
    I also use QwtPolar so I add QWT_POLAR_DLL to my project so solve another unresolve external symbol...
    thanks of all body.

    Goodluck
    A.A

Similar Threads

  1. Unresolved external symbol "staticMetaObject"
    By sr71 in forum Qt Programming
    Replies: 5
    Last Post: 29th June 2010, 23:26
  2. unresolved external symbol
    By gridolfi in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2009, 17:58
  3. Replies: 1
    Last Post: 10th April 2009, 18:07
  4. unresolved external symbol
    By tgreaves in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2009, 19:49
  5. Replies: 16
    Last Post: 23rd May 2008, 10:12

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.