View Full Version : OpenGL/Glut - missing functions
I am running FreeBSD 4.8 with the Nvidia drivers - everything works fine under X when I work normally.
Lately I tried to build a simple OpenGL programm by using glut (took it from a textbook) but I received errors about some missing functions. I compiled the programm just fine on a FreeBSD machine without Nvidia drivers/OpenGL so I think it must be the OpenGL libs from Nvidia!
I attached the really short source with the compile call as well as the error messages!
First, programs should not link against libglx.so. That is for the X server's internal use. All the glX* functions will either be in libGL.so, or in libX11.so. So get rid of -L/usr/X11R6/lib/modules/extensions, and get rid of -lglx.
That will take care of the missing symbols in libglx.so.
For the other symbols (glX*SGIX), see this other thread where others have had the exact same problem with FreeBSD (searching the forums for "FreeBSD *SGIX*" found this, by the way... might have been quicker if you'd have done that ;)):
http://www.nvnews.net/vbulletin/showthread.php?s=&threadid=10161&highlight=FreeBSD+%2ASGIX%2A
And here for someone that had the same problems but with RH 9 (I only include this because it's where I gave instructions on how to compile only Mesa's glut library rather than the whole glut package):
http://www.nvnews.net/vbulletin/showthread.php?s=&threadid=10032
thanks for the quick answer - if i would have known for sure that this is the problem ...
I will try to rebuild Mesa glut and see what comes out of that. But just to clear things up for me:
1) the standard libglut tries to call functions from libGL that need not neccessarily be there
2) libglut should check if they are there and don't use them if they are not implemented
3) this is an error in the libglut implementation of FreeBSD
About right?
Thx, mike
Pretty much. It's not entirely FreeBSD's fault (since they didn't write that glut), but the problem goes away if you use Mesa's glut library, yes.
Ive been following the diffrent threads on this ...SGIX problem for a while, as I was struck by "the gang of five" myself.
glXBindChannelToWindowSGIX
glXQueryChannelDeltasSGIX
glXChannelRectSyncSGIX
glXChannelRectSGIX
glXQueryChannelRectSGIX
None of the Linux (rebuilding Mesa etc) or FreeBSD solutions worked for me.
I wound up installing from ports the freeglut-1.3 and adjusted my makefiles accordingly.
Now it works OK!
Example of a simple compile command:
gcc -o ex1 example1.c -I/usr/local/include -I/usr/X11R6/include -L/usr/local/lib -lfreeglut-1.3
Happy GLUTting
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.