Using static libraries: gcc -o sample.exe sample.c -I../../../include -L../../../lib/mingw4 -liup -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 Using dynamic libraries: gcc -o sample.exe sample.c -I../../../include -L../../../lib/dllw4 -liup Using dynamic libraries with no console: gcc -Wl,-subsystem,windows -o sample.exe sample.c -I../../../include -L../../../lib/dllw4 -liupstub -liup Adding a resource file: windres -O coff -o iup.res ../../../etc/iup.rc gcc -Wl,-subsystem,windows -o sample.exe sample.c iup.res -I../../../include -L../../../lib/dllw4 -liupstub -liup Using IupMatrix: gcc -o sample.exe matrix.c -I../../../../iup/include -L../../../../iup/lib/mingw4 -L../../../../cd/lib/mingw4 -L../../../../freetype/lib/mingw4 -L../../../../zlib/lib/mingw4 -liup -liupcontrols -liupcd -lcd -lfreetype6 -lz -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 A more complex set of libraries (using static libraries): g++ -o sample.exe plot.c -I../../../include -I../../../../cd/include -L../../../lib/mingw4 -L../../../../cd/lib/mingw4 -L../../../../freetype/lib/mingw4 -L../../../../zlib/lib/mingw4 -liup_plot -liupgl -liupcontrols -liupcd -lcdcontextplus -lcdgl -lcd -liup -lftgl -lfreetype6 -lz -lglu32 -lopengl32 -lgdiplus -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 A more complex set of libraries (using dynamic libraries): g++ -o sample.exe plot.c -I../../../include -I../../../../cd/include -L../../../lib/dllw4 -L../../../../cd/lib/dllw4 -L../../../../freetype/lib/dllw4 -L../../../../zlib/lib/dllw4 -liup_plot -liupcontrols -liup -lcd