Results 1 to 2 of 2

Thread: Strange undefined Reference linking error QMetaObject const QwtPlot::staticMetaObjec

  1. #1

    Default Strange undefined Reference linking error QMetaObject const QwtPlot::staticMetaObjec

    Hello,

    i used qwt for many years without any problems with the msvc2012-2013-2016-2017-2019 ide. Now i have the problem that i cannot compile
    my software without a linker error message which says: "error LNK2001: ""public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)"

    This problem is new to me and i have this error only in the debug version of the software and only for the 2 classes inherited from QwtPlot.

    I found a solution from someone how add the QWT_DLL argument to the preprocessor line. But this doesent work for me. I updated also to the newest version of qwt 6.1.4 but this
    also do not solve my problem.

    Can anyone give me a tip how to solve this problem?

    Best regards,

    Benton

  2. #2
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    39
    Thanks
    23
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Strange undefined Reference linking error QMetaObject const QwtPlot::staticMetaOb

    Hi,

    I suspect a "build" problem (and MOC). What build system do you use ? Personally, on Windows, I prefer using CMake to generate Visual Studio solutions.

Similar Threads

  1. Replies: 4
    Last Post: 9th May 2016, 12:30
  2. Replies: 10
    Last Post: 19th September 2012, 15:13
  3. Replies: 0
    Last Post: 15th July 2011, 03:21
  4. Replies: 3
    Last Post: 3rd December 2010, 15:21
  5. Linking error: libQtNetwork.so: undefined reference to `_freeifaddrs'
    By dacla in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 21st April 2008, 22:26

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.