Results 1 to 4 of 4

Thread: "Undefined reference to `QwtPlot::QwtPlot(QWidget*)'

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2021
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default "Undefined reference to `QwtPlot::QwtPlot(QWidget*)'

    Hi everyone. I am experiencing a problem while using the QwtPlot library.

    I have created a plot class, which inherits the QwtPlot library. However, When I try to run I get errors "Undefined reference to `QwtPlot::QwtPlot(QWidget*)'.

    plot.h
    Qt Code:
    1. #ifndef PLOT_H
    2. #define PLOT_H
    3. #include <qwt_plot.h>
    4. #include <qwt_plot_curve.h>
    5.  
    6. class plot : QwtPlot
    7. {
    8. public:
    9. plot();
    10. virtual ~plot();
    11.  
    12. private:
    13. QwtPlotCurve* curve_data;
    14. };
    15.  
    16. #endif // PLOT_H
    To copy to clipboard, switch view to plain text mode 
    plot.cpp

    Qt Code:
    1. #include "plot.h"
    2.  
    3. plot::plot()
    4. {
    5. }
    6.  
    7. plot::~plot()
    8. {
    9. }
    To copy to clipboard, switch view to plain text mode 


    However, If i don't inherit the QwtPlot then everything works and I don't get any error for QwtPlotCurve (which shows that QWT is installed correctly).

    Any suggestion on how to resolve this inheritance issue?
    Attached Images Attached Images

Similar Threads

  1. Replies: 1
    Last Post: 2nd August 2019, 17:33
  2. Replies: 2
    Last Post: 13th March 2017, 07:59
  3. Replies: 10
    Last Post: 19th September 2012, 16:13
  4. Replies: 0
    Last Post: 15th July 2011, 04:21
  5. Replies: 6
    Last Post: 14th May 2009, 13:02

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.