where are the opengl libraries get stored on ubuntu : i need this to mention in my make file
Solution 1
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
Solution 2
/usr/lib/libGL.so
link with -lGL
Solution 3
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.
Related videos on Youtube
kumar
Updated on April 14, 2022Comments
-
kumar about 2 years
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
-
kumar over 14 yearsin usr/lib i didnt find the file ,can i know what names it may have
-
Ignacio Vazquez-Abrams over 14 yearsIf you don't have it then perhaps you should consider installing it from its package. Try something starting with
mesa
and ending with-dev
. -
kumar over 14 yearsdo 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 over 14 yearsHai 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