Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MinGW 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.

like image 214
tonga Avatar asked Nov 21 '12 23:11

tonga


People also ask

Should I use MinGW or Cygwin?

MinGW is higher performance than Cygwin, but it's also 32-bit which may be a problem with your applications. There is a 64-bit environment similar to MinGW but it's a different project. MinGW-w64 is in all senses the successor to MinGW. org's version.

Is MinGW and GCC same?

MinGW is a compiler system based on the GNU GCC and Binutils projects that compiles and links code to be run on Win32 (Windows) systems. It provides C, C++ and Fortran compilers plus other related tools. 'MinGW' refers to the "Minimalist GNU for Windows" project.

Does Cygwin install MinGW?

You can install MinGW-W64 under "Cygwin" by selecting these packages (under "Devel" category): mingw64-x86_64-gcc-core : 64-bit C compiler for native 64-bit Windows. The executable is " x86_64-w64-mingw32-gcc ". mingw64-x86_64-gcc-g++ : 64-bit C++ compiler for native 64-bit Windows.

Does MinGW include GCC?

MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a set of freely distributable Windows specific header files and static import libraries which enable the use of the Windows API, a Windows native build of the GNU Project's GNU Debugger, and ...


2 Answers

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.

like image 96
wardd Avatar answered Sep 28 '22 08:09

wardd


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.

like image 22
Gibbon1 Avatar answered Sep 28 '22 06:09

Gibbon1