I have written some effects in C++ (g++) using freeglut on Linux, and I compile them with
g++ -Wall -lglut part8.cpp -o part8
mingw32 exists as a package for Linux. You can cross-compile and -link Windows applications with it. There's a tutorial here at the Code::Blocks forum. Mind that the command changes to
mingw32-gcc, for example.
EDIT: Debian Linux, for example, has MinGW in its repositories:
$ apt-cache search mingw mingw32 - Minimalist GNU win32 (cross) compiler mingw32-binutils - Minimalist GNU win32 (cross) binutils mingw32-runtime - Minimalist GNU win32 (cross) runtime gcc-mingw32 - The GNU Compiler Collection (cross compiler for MingW32) ...