Results 1 to 8 of 8

Thread: aux functions not working on opengl

  1. #1
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    287
    Thanks
    23
    Thanked 31 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default aux functions not working on opengl

    My aplication uses opengl and works fine, but some opengl funtions like
    auxSolidSphere(), are not recognized, I get the error:

    'auxSolidSphere' was not declared in this scope.

    I understand that the opengl aux functions are for demonstration purpose, and are not to acurate to use. Any ideas how to "activate" them, or any #include I should use ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: aux functions not working on opengl

    You should include proper aux headers (gl/glaux.h) and link against the aux library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    john_god (10th April 2009)

  4. #3
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    287
    Thanks
    23
    Thanked 31 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: aux functions not working on opengl

    Thanks Wysota.
    I first had to look in the forum how to link to a library. I copy the .lib and .h necessary
    files, add LIBS += c:/qt/2009.01/qt/lib/gl/glaux.lib to .pro file, and use #include <gl/glaux.h>.

    Still got huge list of errors with the auxSolidSphere, but as I read in the web, glaux.h is very old and is not used anymore.

    Qt Code:
    1. c:/qt/2009.01/qt/lib/gl/glaux.lib:-1: error: In function `auxWireSphere@8':
    2. D:\nt\private\wind:10: undefined reference to `_imp__glNewList@8'
    3. D:\nt\private\wind:14: undefined reference to `_imp__glEndList@0'
    4. D:\nt\private\wind:17: undefined reference to `_imp__glCallList@4'
    5. c:/qt/2009.01/qt/lib/gl/glaux.lib:-1: error: In function `auxSolidSphere@8':
    6. D:\nt\private\wind:10: undefined reference to `_imp__glNewList@8'
    7. D:\nt\private\wind:15: undefined reference to `_imp__glEndList@0'
    8. ......
    To copy to clipboard, switch view to plain text mode 

    Guess the errors are related to some incompatibility with actual opengl.
    So I 'll just have to write my own auxSolidSphere funtion.

    Nice Easter to all you guys

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: aux functions not working on opengl

    It seems you are not linking with the OpenGL library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    287
    Thanks
    23
    Thanked 31 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: aux functions not working on opengl

    If I remove

    Qt Code:
    1. LIBS += c:/qt/2009.01/qt/lib/gl/glaux.lib
    To copy to clipboard, switch view to plain text mode 
    from the .pro file I get the error:
    Qt Code:
    1. D:/qt4examples/Matematica/glgraph.cpp:352: undefined reference to `auxSolidSphere@8'
    2. :-1: error: collect2: ld returned 1 exit status
    To copy to clipboard, switch view to plain text mode 

    but if I leave the
    Qt Code:
    1. LIBS += c:/qt/2009.01/qt/lib/gl/glaux.lib
    To copy to clipboard, switch view to plain text mode 
    in the .pro file the errors are the ones I indicate in the post above

    How can I know if I am liking?
    Last edited by john_god; 10th April 2009 at 19:30. Reason: updated contents

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: aux functions not working on opengl

    You should have OpenGL enabled if you added the QT+=opengl switch to the project file. Now the question is whether this OpenGL library is what the aux library was linked against. Versions might differ and both the libraries may be prepared for different compilers (like MSVC vs MinGW). Which one are you using?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #7
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    287
    Thanks
    23
    Thanked 31 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: aux functions not working on opengl

    I am using mingw compiler, but the aux library I copied from a old computer I got with MS visualc 6. So I supose I will have to look the web for a aux library that work with mingw, am I right ?

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: aux functions not working on opengl

    Yes, that's probably correct. If sources for this library are available, you can recompile it for MinGW yourself.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 19:04
  2. QT + OpenGL + Thread => aaaahhhhh !
    By anthibug in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2008, 14:36
  3. openGL in Qtopia core
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th July 2008, 12:26
  4. Cylinder draw using QT opengl functions
    By YuriyRusinov in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2008, 00:58
  5. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 08:21

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.