I currently use mingw and I noticed that in the linking phase the following options appear without specifying nothing of that: -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 How can avoid this?