9

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
  • 159
  • 1
  • 2
  • 6

5 Answers5

12

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

zelgit
  • 131
  • 1
  • 5
2

/usr/lib/libGL.so

link with -lGL

sisis
  • 936
  • 7
  • 12
1

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.

Benjamin Bannier
  • 55,163
  • 11
  • 60
  • 80
0

They're part of mesa, as libGL*.so.* and the like, usually in /usr/lib*.

Ignacio Vazquez-Abrams
  • 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
0

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

AuHgNeM
  • 559
  • 4
  • 2