Copy all the contents to your MinGw folder. To uncompress it, open up the msys window and type in bunzip2 gdb-6.6.tar.bz2 and then tar -xvf gdb-6.6.tar. MinGW does not include the GDB debugger so download gdb-6.6.tar.bz2 and install it to your MinGW directory. Do NOT install the make in the MinGW setup. When installing MinGW, select the G++ and other compilers. The latest version can be checked on the respective website. Now supports C/C++ and many other languages.
MinGW is different from Cygwin because it uses the Windows C runtime libraries(mscvrt) rather than GNU’s libc. MinGW: A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs.While you can use Microsoft Visual Studio to program OpenCV apps, I find Eclipse a much easier to use IDE. Here’s a guide to start hacking computer vision and image processing applications using OpenCV/Eclipse on Windows machines. Developing OpenCV Applications with Eclipse on Windows