ich verwende Eclipse Indigo zusammen mit dem Qt Plugin.
Ich habe eine Qt Application mit einem Widget, das so aussieht:
Code: Alles auswählen
/*
* GLWidget.h
*
* Created on: Sep 22, 2011
* Author: martin
*/
#ifndef GLWIDGET_H_
#define GLWIDGET_H_
#include <QGLWidget>
#include "GraphicSystem.h"
class GLWidget : public QGLWidget, public GraphicSystem {
public:
GLWidget(QWidget *parent);
virtual void render();
//virtual ~GLWidget();
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
};
#endif /* GLWIDGET_H_ */
Code: Alles auswählen
make debug
make -f Makefile.Debug
make[1]: Entering directory `/home/martin/workspace/IntersectionTesting_QTGUI'
g++ -Wl,-rpath,/home/martin/QtSDK/Desktop/Qt/474/gcc/lib -o IntersectionTesting_QTGUI debug/GLWidget.o debug/main.o debug/intersectiontesting_qtgui.o debug/moc_intersectiontesting_qtgui.o -L/home/martin/QtSDK/Desktop/Qt/474/gcc/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread
debug/GLWidget.o: In function `GraphicSystem':
make[1]: Leaving directory `/home/martin/workspace/IntersectionTesting_QTGUI'
/home/martin/workspace/IntersectionTesting_QTGUI/../IntersectionTesting/src/GraphicSystem.h:11: undefined reference to `WorldChangedModel::WorldChangedModel()'
collect2: ld returned 1 exit status
make[1]: *** [IntersectionTesting_QTGUI] Error 1
make: *** [debug] Error 2