The GL library libgl.a is a shared library. By default, a GL program linked with the -lgl flag will link to the libgl.a library as a shared library. By using shared libraries, programs minimize the amount of disk space and memory that they use. A shared library is not bound in with the executable; thus the size of the executable is smaller (kilobytes, for small programs, instead of megabytes). Memory usage is decreased, because several programs running at the same time share the .text segment (the segment where the executable code is contained) of the library (a separate .data segment is created for each program).
Attention: The GL library cannot be linked non-shared. Doing so will result in erratic and incorrect behaviour of GL programs. This warning applies to the C version of GL (libgl.a library) as well as the FORTRAN version (libfgl.a library).