View Full Version : aux functions not working on opengl

9th April 2009, 21:38
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 ?

9th April 2009, 23:04
You should include proper aux headers (gl/glaux.h) and link against the aux library.

10th April 2009, 13:26
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.

c:/qt/2009.01/qt/lib/gl/glaux.lib:-1: error: In function `auxWireSphere@8':
D:\nt\private\wind:10: undefined reference to `_imp__glNewList@8'
D:\nt\private\wind:14: undefined reference to `_imp__glEndList@0'
D:\nt\private\wind:17: undefined reference to `_imp__glCallList@4'
c:/qt/2009.01/qt/lib/gl/glaux.lib:-1: error: In function `auxSolidSphere@8':
D:\nt\private\wind:10: undefined reference to `_imp__glNewList@8'
D:\nt\private\wind:15: undefined reference to `_imp__glEndList@0'

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

10th April 2009, 15:39
It seems you are not linking with the OpenGL library.

10th April 2009, 18:46
If I remove

LIBS += c:/qt/2009.01/qt/lib/gl/glaux.lib

from the .pro file I get the error:

D:/qt4examples/Matematica/glgraph.cpp:352: undefined reference to `auxSolidSphere@8'
:-1: error: collect2: ld returned 1 exit status

but if I leave the
LIBS += c:/qt/2009.01/qt/lib/gl/glaux.lib

in the .pro file the errors are the ones I indicate in the post above

How can I know if I am liking?

10th April 2009, 21:22
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?

11th April 2009, 12:27
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 ?

11th April 2009, 13:23
Yes, that's probably correct. If sources for this library are available, you can recompile it for MinGW yourself.