First off I have 2 linux boxes running Suse 9.2.
First Box: 32 bit Athlon running 32bit Suse
Second Box: 64 bit AMD-64 running 64bit Suse
Looking at Second Box (64 bit):--------------------------
I have installed packages:
freeglut-2.2.0-82.1.x86_64.rpm
freeglut-32bit-9.2-200410201617.x86_64.rpm
xorg-x11-Mesa-6.8.1-15.1.x86_64.rpm
xorg-x11-Mesa-32bit-9.2-200410201617.x86_64.rpm
Now if you search the ENTIRE system there simply is no “glut.h” anywhere in SUSE.
My solution (which I don’t know if its correct):
Download:
MesaDemos-6.2.1.tar.gz --> contains “glut.h”
MesaLib-6.2.1.tar.gz --> contaings the GL library
(In MesaLib-6.2.1.tar.gz we have): …/Mesa-6.2.1/include/GL/
amesa.h glext.h glu_mangle.h internal svgamesa.h wmesa.h
dmesa.h gl.h glxext.h mesa_wgl.h uglglutshapes.h xmesa.h
fxmesa.h gl_mangle.h glx.h mglmesa.h uglmesa.h xmesa_xf86.h
ggimesa.h glu.h glx_mangle.h osmesa.h vms_x_fix.h xmesa_x.h
Copy the GL directory in the MesaLib-6.2.1.tar.gz into /usr/local/include/
NOTE: there was no ‘GL’ directory in /usr/lib/include/ prior to me copying
it into there.
There’s no “libglut.so” in /usr/lib/ but there is two libglut’s:
/usr/lib/libglut.so.3.8.0
/usr/lib64/libglut.so.3.8.0
So, I create a link:
ln -s /usr/lib64/libglut.so.3.8.0 /usr/lib/libglut.so
Now I want to run…“opengltest.c”
NOTE: I will replace the GREATER than and LESS than with ‘(’ and ‘)’
so that I don’t have problem pasting this to the forumn.
All i’m trying to run is this:
//begin------: opengltest.c
#include (math.h)
#include (stdlib.h)
#include (GL/glut.h)
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_INDEX | GLUT_DOUBLE);
glutCreateWindow(“Bounce”);
//omit the rest since we can’t get past above
return 0; /* ANSI C requires main to return int. */
}
//end opengltest.c
To compile: gcc -lglut -lGL -lm bounce.c
We get actually compiling:
MyMachine> gcc -lglut -lGL -lm bounce.c
MyMachine> //We compile it fine, and no errors now.
NOTE: before creating the link /usr/lib/libglut.so I got:
(error ‘cannot find -lglut’.)
and to remedy that I had to do all the above to get the point
where I can now compile.
Now trying to run it:
./a.out
Gives error: freeglut_window.c:300: fgOpenWindow: Assertion `window->Window.VisualInfo != ((void *)0)’ failed.
Doing the same thing on my first box (32-bit linux box) I link with:
ln -s /usr/lib/libglut.so.3.8.0 /usr/lib/libglut.so
instead of
ln -s /usr/lib64/libglut.so.3.8.0 /usr/lib/libglut.so
for the 64 bit box.
The result is I get the same error when trying to compile:
“freeglut_window.c:300: fgOpenWindow: Assertion `window->Window.VisualInfo != ((void *)0)’ failed.”
So this fails to run. Am I supposed to get glut.h somewhere else? And maybe i don’t need to create GL directory and put those files in there.
NOTE: ./glxgears runs fine as a OpenGL program and so I know that I can run OpenGL programs.
Any ideas?