pospiech
23rd August 2009, 12:12
I am trying to use the libary qwt3d.
I created a simple class to use it:
#ifndef QPLOT3D_H_
#define QPLOT3D_H_
#include <qwt3d_surfaceplot.h>
#include <qwt3d_function.h>
using namespace Qwt3D;
class QPlot3D : public SurfacePlot
{
Q_OBJECT
public:
QPlot3D(QWidget* parent = 0, Qt::WFlags flags = 0);
virtual ~QPlot3D();
};
#endif
#include "QPlot3D.h"
QPlot3D::QPlot3D( QWidget* parent /*= 0*/, Qt::WFlags flags /*= 0*/ )
: SurfacePlot(parent)
{
}
QPlot3D::~QPlot3D()
{
}
which results only in the linker error:
1>moc_QPlot3D.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const Qwt3D::SurfacePlot::staticMetaObject" (?staticMetaObject@SurfacePlot@Qwt3D@@2UQMetaObjec t@@B)
the libary (.lib) files are loaded, the moc file is part of the project and compiled.
Therefore I do not see what is missing.
I created a simple class to use it:
#ifndef QPLOT3D_H_
#define QPLOT3D_H_
#include <qwt3d_surfaceplot.h>
#include <qwt3d_function.h>
using namespace Qwt3D;
class QPlot3D : public SurfacePlot
{
Q_OBJECT
public:
QPlot3D(QWidget* parent = 0, Qt::WFlags flags = 0);
virtual ~QPlot3D();
};
#endif
#include "QPlot3D.h"
QPlot3D::QPlot3D( QWidget* parent /*= 0*/, Qt::WFlags flags /*= 0*/ )
: SurfacePlot(parent)
{
}
QPlot3D::~QPlot3D()
{
}
which results only in the linker error:
1>moc_QPlot3D.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const Qwt3D::SurfacePlot::staticMetaObject" (?staticMetaObject@SurfacePlot@Qwt3D@@2UQMetaObjec t@@B)
the libary (.lib) files are loaded, the moc file is part of the project and compiled.
Therefore I do not see what is missing.