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
    60
    Thanks
    32
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    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, 13:30
  2. Replies: 10
    Last Post: 19th September 2012, 16:13
  3. Replies: 0
    Last Post: 15th July 2011, 04:21
  4. Replies: 3
    Last Post: 3rd December 2010, 16: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, 23: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.