after searching about it i found some info (yet confusing for me)
Cygwin is a Unix-like environment and command-line interface for Microsoft Windows.
i found the above line in wikipedia but what does that mean? i'm not getting a clear idea about MinGW and cygwin and msys, please help
Because it keeps confusing people:
Cygwin: think of it as an OS. It provides a POSIX C runtime built on top of Windows so you can compile most Unix software to run on top of it. It comes with GCC, and to some extent, you can call the Win32 API from within Cygwin, although I'm not sure that is meant to happen or work at all.
MSYS(2): a fork of Cygwin which has path translation magic to make native Windows programs work nicely with it. Its main goal is to provide a shell so you can run autotools configure scripts. You are not meant to build MSYS applications at all. Note that MSYS2 strives for much more and contains a full-blown package management system so you can easily install MinGW-w64 libraries and tools.
MinGW(-w64): A native Windows port of the GCC compiler, including Win32 API headers and libs. It contains a tiny POSIX compatibility layer (through e.g. winpthreads, the unistd.h headers and some other bits), but you cannot compile POSIX software with this. This is best compared to MSVC, which also produces native code using the Win32 API.
Note that there are MinGW-w64 cross-compilers that run on Cygwin. With MSYS2, I frankly don't see a good reason to do that. Might as well run a VM with Linux if you're going to use Cygwin for that.