PDA

View Full Version : qt with opengl



sajis997
5th November 2013, 18:41
hi forum,

i developed a qt / opengl app in a linux system and it worked there.

Now i i am trying to compile it in another linux system and i m getting the folowing error:



sajjad@sajjad-G74Sx:~/Documents/QtStuff/projection$ make
g++ -o projection LabelCounter.o FrustumMainWidget.o OrthoMainWidget.o PerspectiveMainWidget.o SharedWidgetData.o glWidgetWorldSpace.o glWidgetScreenSpace.o glm.o ProjectionMainWindow.o main.o GLToolkit.o GroupBoxCommandExtendedBox.o moc_LabelCounter.o moc_FrustumMainWidget.o moc_OrthoMainWidget.o moc_PerspectiveMainWidget.o moc_SharedWidgetData.o moc_glWidgetWorldSpace.o moc_glWidgetScreenSpace.o moc_ProjectionMainWindow.o moc_GroupBoxCommandExtendedBox.o -L/usr/lib/i386-linux-gnu -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread
glWidgetWorldSpace.o: In function `GLWidgetWorldSpace::worldReshape(int, int)':
/home/sajjad/Documents/QtStuff/projection/glWidgetWorldSpace.cpp:85: undefined reference to `gluPerspective'
glWidgetScreenSpace.o: In function `GLWidgetScreenSpace::screenReshape(int, int)':
/home/sajjad/Documents/QtStuff/projection/glWidgetScreenSpace.cpp:95: undefined reference to `gluPerspective'
/home/sajjad/Documents/QtStuff/projection/glWidgetScreenSpace.cpp:125: undefined reference to `gluLookAt'
collect2: ld returned 1 exit status
make: *** [projection] Error 1



here goes the snapshot of the .pro file:



QT += opengl
HEADERS += \
LabelCounter.h \
FrustumMainWidget.h \
OrthoMainWidget.h \
PerspectiveMainWidget.h \
SharedWidgetData.h \
glWidgetWorldSpace.h \
glWidgetScreenSpace.h \
glm.h \
ProjectionMainWindow.h \
singleton.h \
GLToolkit.h \
GroupBoxCommandExtendedBox.h

SOURCES += \
LabelCounter.cpp \
FrustumMainWidget.cpp \
OrthoMainWidget.cpp \
PerspectiveMainWidget.cpp \
SharedWidgetData.cpp \
glWidgetWorldSpace.cpp \
glWidgetScreenSpace.cpp \
glm.cpp \
ProjectionMainWindow.cpp \
main.cpp \
GLToolkit.cpp \
GroupBoxCommandExtendedBox.cpp

FORMS += \
projection.ui \
perspective.ui \
ortho.ui \
frustum.ui



anything missing ?


thanks
sajjad

stampede
5th November 2013, 20:46
Try adding
LIBS += -lGLU to .pro file.