Results 1 to 2 of 2

Thread: qt with opengl

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default qt with opengl

    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:

    Qt Code:
    1. sajjad@sajjad-G74Sx:~/Documents/QtStuff/projection$ make
    2. 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
    3. glWidgetWorldSpace.o: In function `GLWidgetWorldSpace::worldReshape(int, int)':
    4. /home/sajjad/Documents/QtStuff/projection/glWidgetWorldSpace.cpp:85: undefined reference to `gluPerspective'
    5. glWidgetScreenSpace.o: In function `GLWidgetScreenSpace::screenReshape(int, int)':
    6. /home/sajjad/Documents/QtStuff/projection/glWidgetScreenSpace.cpp:95: undefined reference to `gluPerspective'
    7. /home/sajjad/Documents/QtStuff/projection/glWidgetScreenSpace.cpp:125: undefined reference to `gluLookAt'
    8. collect2: ld returned 1 exit status
    9. make: *** [projection] Error 1
    To copy to clipboard, switch view to plain text mode 

    here goes the snapshot of the .pro file:

    Qt Code:
    1. QT += opengl
    2. HEADERS += \
    3. LabelCounter.h \
    4. FrustumMainWidget.h \
    5. OrthoMainWidget.h \
    6. PerspectiveMainWidget.h \
    7. SharedWidgetData.h \
    8. glWidgetWorldSpace.h \
    9. glWidgetScreenSpace.h \
    10. glm.h \
    11. ProjectionMainWindow.h \
    12. singleton.h \
    13. GLToolkit.h \
    14. GroupBoxCommandExtendedBox.h
    15.  
    16. SOURCES += \
    17. LabelCounter.cpp \
    18. FrustumMainWidget.cpp \
    19. OrthoMainWidget.cpp \
    20. PerspectiveMainWidget.cpp \
    21. SharedWidgetData.cpp \
    22. glWidgetWorldSpace.cpp \
    23. glWidgetScreenSpace.cpp \
    24. glm.cpp \
    25. ProjectionMainWindow.cpp \
    26. main.cpp \
    27. GLToolkit.cpp \
    28. GroupBoxCommandExtendedBox.cpp
    29.  
    30. FORMS += \
    31. projection.ui \
    32. perspective.ui \
    33. ortho.ui \
    34. frustum.ui
    To copy to clipboard, switch view to plain text mode 

    anything missing ?


    thanks
    sajjad

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qt with opengl

    Try adding
    Qt Code:
    1. LIBS += -lGLU
    To copy to clipboard, switch view to plain text mode 
    to .pro file.

Similar Threads

  1. converting GLUT/OpenGL to Qt/OpenGL - displaying issue
    By yoti13 in forum Qt Programming
    Replies: 1
    Last Post: 25th November 2012, 00:45
  2. [Qt 4.6.3/OpenGL 4.1] : Unrecognized OpenGL
    By didier in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2011, 23:33
  3. Replies: 0
    Last Post: 6th December 2009, 00:41
  4. Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed!
    By vinpa in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 10:10
  5. Problem from OpenGL to QT OpenGL
    By nuts_fever_007 in forum Newbie
    Replies: 5
    Last Post: 15th May 2009, 09:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.