Advertisement

where to find gl.h glu.h

Started by September 11, 2003 08:06 AM
5 comments, last by emptyhead 21 years ago
I recently installed Knoppix (Debian) and I must say that I love it However, I now have a rather annoying problem that I don''t know how to solve. I have installed the linux nvidia drivers (I have a gforce2mx) and they are working nicely (successfully running q3a and et). My problem is that can''t compile any programs using opengl the compiler can''t find any GL related header files. I looked around in /usr/include/GL but only found symlinks to non existing files there. I don''t have any /usr/X11R6/include/GL directory, and i assume that this is where the opengl headers should be. I''ve been trying to find some package that includes the header and library files, but haven''t found anything useable. If for example i try: apt-get install xlibmesa4-glu it says i already have the newest version, other packages i''ve tried need to uninstall lots of other packages, including the display drivers, so i haven''t dared trying them.. So does anyone know which packages i need to install? or where i can get the header and library files used by opengl programs? /thanks in advance!
:wq!
You''ll have to install the -dev counterparts. Here, I have:

xlibmesa3-gl
xlibmesa-gl-dev
xlibmesa3-glu
xlibmesa-glu-dev

You''ll also have to install nvidia-glx and nvidia-glx-dev.


Hope this helps.
Advertisement
This is what i get:

# apt-get install xlibmesa3-gl
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
kdelibs4-dev libarts1-dev libartsc0-dev libqt3-mt-dev nvidia-glx-dev
xlibmesa-gl-dev xlibmesa-glu-dev xlibmesa4-dri xlibmesa4-gl
The following NEW packages will be installed:
xlibmesa3-gl
0 packages upgraded, 1 newly installed, 9 to remove and 283 not upgraded.
Need to get 3763kB of archives. After unpacking 14.5MB will be freed.

# apt-get install xlibmesa-gl-dev
Reading Package Lists... Done
Building Dependency Tree... Done
Sorry, xlibmesa-gl-dev is already the newest version.


#apt-get install xlibmesa3-glu
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
kdelibs4-dev libarts1-dev libartsc0-dev libqt3-mt-dev nvidia-glx-dev
xlibmesa-glu-dev xlibmesa4-glu
The following NEW packages will be installed:
xlibmesa3-glu
0 packages upgraded, 1 newly installed, 7 to remove and 283 not upgraded.
Need to get 259kB of archives. After unpacking 8057kB will be freed.

# apt-get install xlibmesa-glu-dev
Reading Package Lists... Done
Building Dependency Tree... Done
Sorry, xlibmesa-glu-dev is already the newest version.

nvidia-glx and nvidia-glx-dev are also the newest version

I find it a bit strange that the -dev packages already are installed, but not the header files..
Is there any way to repair an installation, or at least check if it''s ok?
:wq!
Ugh, my bad. It looks like you''ll only need the nvidia-glx-dev package after all. Sorry .

In /usr/share/doc/nvidia-glx/readme.Debian, I found this:

quote:
Note about OpenGL headers: The header files are not installed to
/usr/include/GL but to /usr/share/doc/nvidia-glx-dev/include/GL.
This is similar to what NVIDIA
does in their own packaging, allowing use of and not overwriting
preinstalled headers (e.g. xlibmesa-dev). If you wish to use the NVIDIA
supplied headers (e.g. you require NVIDIA GL extensions) you must copy them to
/usr/include/GL yourself or include /usr/share/doc/nvidia-glx-dev/include in
your includes path when compiling.



Hope this helps.
Yes, thanks! I found:

gl.h
glx.h
glxtokens.h

and copied them to /usr/X11R6/include/GL so now it almost works,
but i still need glu.h and glut.h...

any idea?

:wq!
quote: Original post by emptyhead
Yes, thanks! I found:

gl.h
glx.h
glxtokens.h

and copied them to /usr/X11R6/include/GL so now it almost works,
but i still need glu.h and glut.h...

any idea?



Glut is another package entirely, as it''s not part of the OpenGL implementation (unlike GLU and GLX, at least on *nix systems).

Install libglut3 and libglut3-dev ("apt-cache search glut" in case the packages names differ).

As for glu.h, it should come with xlibmesa-glu-dev. I don''t know why it isn''t present on your system if that package is installed.


Hope this helps.
Advertisement
I got it working now, I removed the xlibmesa-glu-dev package (and 6 others that depended on it) and then installed it again, and now i have all the gl files

Thanks for all the help!
:wq!

This topic is closed to new replies.

Advertisement