So far I managed to compile two of the tutorial lessons from lazyfoo.net.
This is my makefile for compiling the first two OpenGL tutorials from lazyfoo.net:
opengl: gcc -Wall -ansi -pedantic LUtil.cpp main.cpp -o main -lOpenGL32 -lglu32 -lfreeglut && ./main opengl_static: gcc -Wall -ansi -pedantic LUtil.cpp main.cpp -o main -D FREEGLUT_STATIC -lfreeglut_static -lwinmm -lgdi32 -lOpenGL32 -lglu32 && ./main
Here are the links to the tutorials where I got the first two lessons.
The source code of those tutorials is split into 4 files and lazyfoo is really picky about people not sharing the source code anywhere else. But as you can see from the following screenshot I got it working!