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
#ifndef PLOT_H
#define PLOT_H
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
{
public:
plot();
virtual ~plot();
private:
};
#endif // PLOT_H
#ifndef PLOT_H
#define PLOT_H
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
class plot : QwtPlot
{
public:
plot();
virtual ~plot();
private:
QwtPlotCurve* curve_data;
};
#endif // PLOT_H
To copy to clipboard, switch view to plain text mode
plot.cpp
#include "plot.h"
plot::plot()
{
}
plot::~plot()
{
}
#include "plot.h"
plot::plot()
{
}
plot::~plot()
{
}
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?
Bookmarks