compiling OpenGL program GL/glew.h missing

Solution 1:

libglew is just the library, but not the development files (headers). You need to install those separately. The package name on Debian based systems is libglew-dev and for fedora(and possibly its derivatives) it is glew-devel

Solution 2:

Run the following command:

sudo apt-get install libglew-dev