Ich schon wieder! Nun habe ich erst heute wieder Zeit gefunden daran weiterzuarbeiten, wobei es mir weiterhin nicht gelang, die OpenGL-Beispiele von qt3 zu kompilieren (siehe alte Fehlermeldung unten). Die Includes zu OpenGL habe ich in /usr/include/GL und die LIBS in /usr/lib bzw. /usr/lib/GL gefunden. Daher dachte ich mir folgendes in box.pro müsste weiterhelfen. LIBS += -lMesaGL -lMesaGLU -L/usr/lib/GL REQUIRES = opengl TEMPLATE = app CONFIG += qt opengl warn_on release HEADERS = glbox.h \ globjwin.h SOURCES = glbox.cpp \ globjwin.cpp \ main.cpp TARGET = box DEPENDPATH = $/QTDIR)/include # vormals ../include, das es unter /usr/lib/qt3/doc/examples/opengl/ # aber nicht gibt ??? Das Makefile sieht dann so aus: Schnipp 8< ---------- ############################################################################# # Makefile for building: box # Generated by qmake (1.06c) (Qt 3.2.1) on: Thu Dec 2 20:41:57 2004 # Project: box.pro # Template: app # Command: $(QMAKE) -o Makefile2 box.pro ############################################################################# QMAKE = qmake all clean install distclean mocables uninstall uicables: @echo "Some of the required modules (opengl) are not available." @echo "Skipped." Makefile2: box.pro /usr/lib/qt3/mkspecs/default/qmake.conf $(QMAKE) -o Makefile2 box.pro qmake: @$(QMAKE) -o Makefile2 box.pro ---------->8 Schnapp Ein Ausdokumentieren von REQUIRES = opengl erzeugt ein Makefile, das folgende Fehler ausgibt, wobei zu sehen ist, dass -lGL und -lGLU von qmake automatisch hinzugefügt wird (siehe Anhang qmake.conf aus dem Verzeichnis /usr/lib/qt3/mkspecs/linux-g++) : g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I/usr/include/GL -I/ usr/include -I/usr/lib/qt3/include -I/usr/include -I/usr/X11R6/include -o glbox.o glbox.cpp g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I/usr/include/GL -I/ usr/include -I/usr/lib/qt3/include -I/usr/include -I/usr/X11R6/include -o globjwin.o globjwin.cpp g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I/usr/include/GL -I/ usr/include -I/usr/lib/qt3/include -I/usr/include -I/usr/X11R6/include -o main.o main.cpp g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I/usr/include/GL -I/ usr/include -I/usr/lib/qt3/include -I/usr/include -I/usr/X11R6/include -o moc_glbox.o moc_glbox.cpp g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I/usr/include/GL -I/ usr/include -I/usr/lib/qt3/include -I/usr/include -I/usr/X11R6/include -o moc_globjwin.o moc_globjwin.cpp g++ -o box glbox.o globjwin.o main.o moc_glbox.o moc_globjwin.o -L/usr/lib/ -L/usr/lib/qt3/lib/ -L/usr/lib/ -L/usr/X11R6/lib/ -L/usr/lib/GL -lqt -lGLU -lGL -lXmu -lXext -lX11 -lm glbox.o(.text+0x3c): In function `GLBox::GLBox[not-in-charge](QWidget*, char const*)': : undefined reference to `QGLWidget::QGLWidget[not-in-charge](QWidget*, char const*, QGLWidget const*, unsigned)' glbox.o(.text+0xcc): In function `GLBox::GLBox[in-charge](QWidget*, char const*)': : undefined reference to `QGLWidget::QGLWidget[not-in-charge](QWidget*, char const*, QGLWidget const*, unsigned)' glbox.o(.text+0x15a): In function `GLBox::~GLBox [not-in-charge]()': : undefined reference to `QGLWidget::makeCurrent()' glbox.o(.text+0x178): In function `GLBox::~GLBox [not-in-charge]()': : undefined reference to `QGLWidget::~QGLWidget [not-in-charge]()' glbox.o(.text+0x196): In function `GLBox::~GLBox [not-in-charge]()': : undefined reference to `QGLWidget::~QGLWidget [not-in-charge]()' glbox.o(.text+0x1ea): In function `GLBox::~GLBox [in-charge]()': : undefined reference to `QGLWidget::makeCurrent()' glbox.o(.text+0x208): In function `GLBox::~GLBox [in-charge]()': : undefined reference to `QGLWidget::~QGLWidget [not-in-charge]()' glbox.o(.text+0x226): In function `GLBox::~GLBox [in-charge]()': : undefined reference to `QGLWidget::~QGLWidget [not-in-charge]()' glbox.o(.text+0x27a): In function `GLBox::~GLBox [in-charge deleting]()': : undefined reference to `QGLWidget::makeCurrent()' glbox.o(.text+0x298): In function `GLBox::~GLBox [in-charge deleting]()': : undefined reference to `QGLWidget::~QGLWidget [not-in-charge]()' glbox.o(.text+0x2b7): In function `GLBox::~GLBox [in-charge deleting]()': : undefined reference to `QGLWidget::~QGLWidget [not-in-charge]()' glbox.o(.text+0x3ea): In function `GLBox::initializeGL()': : undefined reference to `QGLWidget::qglClearColor(QColor const&) const' glbox.o(.text+0x4f6): In function `GLBox::makeObject()': : undefined reference to `QGLWidget::qglColor(QColor const&) const' main.o(.text+0x46): In function `main': : undefined reference to `QGLFormat::hasOpenGL()' moc_glbox.o(.text+0x171): In function `GLBox::staticMetaObject()': : undefined reference to `QGLWidget::staticMetaObject()' moc_glbox.o(.text+0x248): In function `GLBox::qt_cast(char const*)': : undefined reference to `QGLWidget::qt_cast(char const*)' moc_glbox.o(.text+0x2ba): In function `GLBox::qt_invoke(int, QUObject*)': : undefined reference to `QGLWidget::qt_invoke(int, QUObject*)' moc_glbox.o(.text+0x357): In function `GLBox::qt_emit(int, QUObject*)': : undefined reference to `QGLWidget::qt_emit(int, QUObject*)' moc_glbox.o(.text+0x39e): In function `GLBox::qt_property(int, int, QVariant*)': : undefined reference to `QGLWidget::qt_property(int, int, QVariant*)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0xac): undefined reference to `QGLWidget::setMouseTracking(bool)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x108): undefined reference to `QGLWidget::reparent(QWidget*, unsigned, QPoint const&, bool)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x148): undefined reference to `QGLWidget::paintEvent(QPaintEvent*)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x150): undefined reference to `QGLWidget::resizeEvent(QResizeEvent*)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1c0): undefined reference to `QGLWidget::makeCurrent()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1c4): undefined reference to `QGLWidget::swapBuffers()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1c8): undefined reference to `QGLWidget::setFormat(QGLFormat const&)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1cc): undefined reference to `QGLWidget::setContext(QGLContext*, QGLContext const*, bool)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1d0): undefined reference to `QGLWidget::renderPixmap(int, int, bool)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1d4): undefined reference to `QGLWidget::grabFrameBuffer(bool)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1d8): undefined reference to `QGLWidget::makeOverlayCurrent()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1dc): undefined reference to `QGLWidget::updateGL()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1e0): undefined reference to `QGLWidget::updateOverlayGL()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1f0): undefined reference to `QGLWidget::initializeOverlayGL()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1f4): undefined reference to `QGLWidget::resizeOverlayGL(int, int)' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1f8): undefined reference to `QGLWidget::paintOverlayGL()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x1fc): undefined reference to `QGLWidget::glInit()' moc_glbox.o(.gnu.linkonce.d._ZTV5GLBox+0x200): undefined reference to `QGLWidget::glDraw()' moc_glbox.o(.gnu.linkonce.d._ZTI5GLBox+0x8): undefined reference to `typeinfo for QGLWidget' collect2: ld returned 1 exit status make: *** [box] Fehler 1 Ein zusatzliches Einfügen von INCLUDEPATH += /usr/include/GL in box.pro bringt keine Änderung der Fehlermeldung. Hier noch eine Kurzinfo zu meinem System: SuSE 9.0 Prof. (inkl. aller Patches) Installiert: - mesaglut & mesaglut-devel 5.0.1-161 - XFree86-Mesa & XFree86-Mesa-devel 4.3.0.1-21 - qt3 3.2.1-68 & qt3-devel 3.2.1-34 - NVIDIA-Treiber NVIDIA-Linux-x86-1.0-6106-pkg1.run Betrieben wird alles an einer NVIDIA FX5600 (2 Monitoren an der Karte angeschlossen mit unterschiedlichen Auflösungen 1280x1024 und 1024x768, bzw. letzterer virtuelle Oberfläche 1024x1024). Kann mir jemand sagen, wo hier der Hund begraben liegt? Grüße Paul Mitterberger Am Donnerstag, 18. November 2004 12:25 schrieb Stefan Hundhammer:
On Thursday 18 November 2004 11:09, Paul Mitterberger wrote:
QMAKE = qmake all clean install distclean mocables uninstall uicables: @echo "Some of the required modules (opengl) are not available." @echo "Skipped."
Makefile: box.pro /usr/lib/qt3/mkspecs/default/qmake.conf $(QMAKE) -o Makefile box.pro qmake: @$(QMAKE) -o Makefile box.pro
Unser Qt-Maintainer hat gerade gesagt, Du mußt die OpenGL-Libs manuell dazulinken (-l irgendwas), da unsere Qt-Lib OpenGL-Unterstützung nicht statisch dazugelinkt hat, um (meistens unnötige) Abhängigkeiten von OpenGL-Libs und deren Paketen zu minimieren.
Jetzt mußt Du nur noch herausbekommen, welche Du genau brauchst (das hat er mir beim Vorbeiflug nicht verraten) - GL, GLU, MesaGL, MesaGLU. Ausprobieren hilft.
CU -- Stefan Hundhammer
Penguin by conviction. YaST2 Development SUSE Linux Products GmbH Nuernberg, Germany
-- paul.mitterberger@gmx.net