Why does GCC-Windows depend on cygwin? Why does GCC-Windows depend on cygwin? windows windows

Why does GCC-Windows depend on cygwin?


Actually, the question premise is wrong: MinGW GCC does NOT require Cygwin.

You will see you don't need Cygwin at all. It runs natively on Windows (32-bit, at least). Both the toolchain and the produced binaries are independent of Cygwin.

The MinGW compilers available in Cygwin are different: they are built on the Cygwin platform, to generate code which does not depend on the Cygwin runtime. The compilers themselves do depend on Cygwin in that case. But that's because you installed them from Cygwin.


The Cygwin version of GCC requires Cygwin to be installed, for programs it compiles.

The MinGW version does not require anything after compiling, other than a working copy of Windows.

You can't really mix the Cygwin environment, and the MinGW compilers together, because Cygwin changes the paths of the precompiled libraries.

If you need a bash style shell, but don't want to use Cygwin, I would recommend MSYS.

Cygwin in contrast to MinGW

copied from MinGW Wiki

Cygwin applications by principle are not considered a "Native Win32 application" because it relies on the Cygwin® POSIX Emulation DLL or cygwin1.dll for Posix functions and does not use win32 functions directly. MinGW on the other hand, provides functions supplied by the Win32 API. While porting applications under MinGW, functions not native to Win32 such as fork(), mmap() or ioctl() will need to be reimplemented into Win32 equivalents for the application to function properly.


I try to make my programs under Windows behave like a good Windows citizen, and under Linux like a good Linux citizen.