where are the opengl libraries get stored on ubuntu9.10 : i need this to mention in my make file and what are all the link files i need to mention
5 Answers
Install these to get OpenGL working:
sudo apt-get install mesa-common-dev
sudo apt-get install freeglut3
sudo apt-get install freeglut3-dev
The OpenGL files should be in:
/usr/include/GL/
The Terminal (Compiler) reads (e.g. g++) from:
/usr/bin/
Compile like this (you might need to link more libraries, but test this):
g++ filename -lglut -lGL -lGLU

- 131
- 1
- 5
You should not need to mention their location explicitly in your Makefile
since they should be in the standard library search path (probably in /usr/lib
).
Like sisis wrote you should just need to add -lGL
to the linker flags to link against libGL.so
which might actually come from different sources: mesa
or some fancy graphics card driver.

- 55,163
- 11
- 60
- 80
They're part of mesa
, as libGL*.so.* and the like, usually in /usr/lib*.

- 776,304
- 153
- 1,341
- 1,358
-
in usr/lib i didnt find the file ,can i know what names it may have – kumar Feb 02 '10 at 09:37
-
If you don't have it then perhaps you should consider installing it from its package. Try something starting with `mesa` and ending with `-dev`. – Ignacio Vazquez-Abrams Feb 02 '10 at 09:58
-
do u mean manually or please can you tell me the procedure apt get i did the following libgl1-mesa libgl1-mesa-dev libglu1-mesa glutg3 glutg3-dev libglui-dev libglut3 libglut3-dev can you suggest me more – kumar Feb 02 '10 at 10:23
-
Hai Lgnacio, I did the installation of opengl but where are my lib files stored that info i need ,What names the lib file will have ...etc ..etc – kumar Feb 02 '10 at 10:41
you can check the cmake cache file from any project that has successfully built with opengl, look for OPENGL_opengl_LIBRARY
in my case it is:
OPENGL_opengl_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libOpenGL.so

- 559
- 4
- 2