eclipseMinGW or Cygwin GCC

I want to install a GCC compiler in Windows for the Eclipse IDE. I know there are two options: MinGW GCC or Cygwin GCC. Which one is better for Eclipse CDT? Any experience or suggestions will be appreciated.

Using Cygwin means your program will be dependent on cygwin1.dll, which is essentially a layer that allows POSIX functionality to be used in a Windows environment. Compiling with the standard MinGW GCC provides no such dependancy. This means however, if you intend to compile with MinGW GCC, you will not have access to POSIX functions such as fork() and exec().

For more information on the differences between Cygwin and MinGW, see here.

Personally I like Cygwin better, it has a lot of installation options and it feels a lot like the terminal you'll find on a linux machine. It provides a pretty substancial set of linux-like capabilities, something that Windows fails at miserably.

My offhand thoughts are, if you need cygwin, you need it. For instance compiling programs that were developed for Unix and have symbolic links and shell scripts in the build system.

If you don't need it, you don't want it. And compiling under linux on a virtual machine is often a better choice than going the cygwin route.

So mingw is perfectly fine. Works fine, simple to use.

Also: You might consider codelite (www.codelite.org) instead of Eclipse.

Wikipedia Says:

MinGW forked from version 1.3.3 of Cygwin. Although both Cygwin and MinGW can be used to port UNIX software to Windows, they have different approaches: Cygwin aims to provide a complete POSIX layer that provides emulations of several system calls and libraries that exist on Linux, UNIX, and the BSD variants. The POSIX layer runs on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Windows programs written with Cygwin to run on top of a copylefted compatibility library that must be distributed with the program, along with the program's source code. MinGW aims to provide native functionality and performance via direct Windows API calls. Unlike Cygwin, MinGW does not require a compatibility layer DLL and thus programs do not need to be distributed with source code.

Because MinGW is dependent upon Windows API calls, it cannot provide a full POSIX API; it is unable to compile some UNIX applications that can be compiled with Cygwin. Specifically, this applies to applications that require POSIX functionality like fork(), mmap() or ioctl() and those that expect to be run in a POSIX environment. Applications written using a cross-platform library that has itself been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK+, will usually compile as easily in MinGW as they would in Cygwin.

The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the registry or files on the computer. Cygwin Portable provides a similar feature. By providing more functionality, Cygwin becomes more complicated to install and maintain.

It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows without Cygwin.

Cygwin and Mingw are not interchangeable alternatives. Cygwin is used to compile POSIX API programs, Mingw is used compile Windows API programs.

Chose one or the other depending on what kind program you're going to write.

Related Articles
You Might Also Like