I don't know why,because i had execute sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev, my os is ubuntu16.06.who can help me? thank you very much!!
You don't have the file /usr/include/GL/gl.h on your system?
Might be too late now, but @Itanq, did you try linking with -lGL too? Remember, even if you are using GLEW (or similar extension wrangler), you would need as follows: -lglfw -lGLEW -lGL in that order. You can find further descriptions on how to do this within the GLEW documentation or in GLFW docs. Remember, that GLFW doesn't know anything about OpenGL functions, it's your job to supply those.
@CaffeineViking Good advice in general, but probably not going to help in this case; an error about a missing header file has to be from compile time, not link time.
@tombsar Ah, you are completely right! Anyway, since the problem is under compilation then it must mean that the compiler simply can't find GL/gl.h anywhere in the search path (just like @elmindreda has said). Now the cause for that is interesting. Could @Itanq provide the commands you have used to build your application? Also could you try executing find /usr/include -name 'gl.h' and see if there are any hits for a potential header file on your system? Might be it's located in a funky search path?
Bump. Did you ever figure this out, @Itanq?