How can get MesaGL lib?

i compile a program under linux, but it prompt that " /usr/bin/ld:cannot find -lMesaGL".
i have installed Mesa library, while i can’t can’t find MesaGL lib in the directory /usr/lib.
is there anyone who has encountered this problem? you can also download the program from and compile it on your machine. please tell me what’s the matter!thanks!


well, you need to find out what’s happened to your Mesa library. Did you install it properly?

  • usually graphics related stuff gets installed in /usr/X11R6/lib.
  • if you installed mesa from RPMs then you could try ‘rpm -q --list MesaGL’ and see if it lists where your mesa libraries are;
  • or, if you installed it from source, then make sure you did ‘make install’ after you compiled the library. If you don’t want to make install (because you’re not root, or something) then you’ll need to point your library path to where mesa compiled its libraries.

may the force be with you


at the end of the day, yuo HAVE to know where libMesaGL.* has gone, and that is dependant on how you installed Mesa and how your system is setup.

Hi !

Please notice that later versions of Mesa no longer use the library name MesaGL, it’s just GL as with most other OpenGL drivers, so if you replace -lMesaGL with -lGL I think it should work.


Thanks very much!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.