I can't compile with Glut installed

I installed Glut but when I compiled, it shows this:

C:\MinGW\bin>gcc depth.c -lgl -lglut32 -lopengl32
…\lib\gcc-lib\mingw32\3.2…\mingw32\bin\ld.exe: cannot find -lgl

I got my glut.dll in c:\windows\system, my glut.h in c:\mingw\include\gl, but it doesn’t work. Please help. Many thanks.

-lgl32 ?

-lGL

Try leaving out the -lgl altogether - I had the same problem and as it turned out, my programs didn’t need the gl library.