I stopped using http://mingw.org/ ages ago as it was getting behind on newer Windows API additions and newer gcc versions.
Instead I really recommend MinGW-w64, which supports both Windows 32-bit and 64-bit.
If you want to keep your old MinGW on your system and would like to give MinGW-w64 a try without interfering with your installed version, you can download a standalone build from http://winlibs.com/ that you just need to download and extract.
If you use MSYS shell you should also switch to the newer MSYS2, which is a lot faster.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…