You are most likely missing the OpenGL development files. For running
programs, having just the dynamic libraries is enough, but for
compiling, you need also headers and some symlinks. For Ubuntu-packaged
drivers, look for a package with similar name to the main driver package
but with a -dev suffix.
--
Mikko
I don't use Ubuntu, but the OpenGL development packages are usually
provided by Mesa. I would just search in the package manager for "glew",
"glut", "glfw", install their development packages, and let the
dependencies bring in the OpenGL dev packages.
--
Daniel K. O.