Results 1 to 4 of 4

Thread: porting issue

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

    Default porting issue

    Hello forum


    I have developed a small opengl application with Qt. Not i am porting the application to the new qt version qt 4.8.0

    I having the following linker problem while linking

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


    I have opengl driver installed in my system and it is functional as i have run the qt demos


    Any hint to get around this problem ?


    Regards
    Sajjadul

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: porting issue

    compare the opengl demo .pro files to your .pro file. What was your previous version of Qt?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

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

    Default Re: porting issue

    Hi
    it was done done in qt 4.4 . There is no substantial change i believe in qt 4.8.

    I included the .pro file for you review


    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 


    Thanks
    Sajjadul

  4. #4
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: porting issue

    Here you go: QTBUG-12227

    As stated in the comments, add the following to your project file:
    Qt Code:
    1. LIBS += -lGLU
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Need some help porting from Qt3 to Qt4
    By psadhukhan in forum Qt Programming
    Replies: 3
    Last Post: 27th November 2008, 10:02
  2. Issue porting From Qt4.1.x To Qt4.4.1
    By kutmastak in forum Installation and Deployment
    Replies: 0
    Last Post: 17th October 2008, 15:48
  3. Porting from 4.2.2 to 4.4.1
    By sivrisinek in forum Installation and Deployment
    Replies: 3
    Last Post: 16th October 2008, 06:19
  4. Porting from qwt-4.2.0 to qwt-5.0.2
    By vheinitz in forum Qwt
    Replies: 3
    Last Post: 31st January 2008, 12:39
  5. Porting from Qt3 to Qt4
    By Opilki_Inside in forum Installation and Deployment
    Replies: 1
    Last Post: 1st February 2006, 18:20

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
  •  
Qt is a trademark of The Qt Company.