4

I would like to have a POSIX environment in Windows (to be used as a system shell) and at the same time produce native Windows executables. One option in the past was to install Cygwin and MinGW and possibly call MinGW compiler binaries from Cygwin.

Now an x64 MinGW is available straight as a Cygwin package and there are some blogs documenting how to get them play nicely together.

Before adopting this solution, I would like to know how and if the Cygwin package is different from a standalone MinGW-w64. Specifically which one is more efficient in producing native Win64 exe's? Is Cygwin package itself based on native executables, or is an extension to its gcc compilers?

Update

Some of you miscomprehended this question:

I am not interested in the difference between Cygwin and MinGW at all.

(and by the way, on the very home page of MinGW their main concern is to show how they differentiate from Cygwin)

My question instead is very specific: I am interested in the difference between a specific Cygwin package and its standalone version.
This package happens to be "mingw64-x86_64", which is split in several dependencies files, of which the most relevant is perhaps "mingw64-x86_64-gcc-core".

Sorry, but references found in some comments are utterly wrong with respect to what is asked here: first they address to Cygwin as a whole and not the mentioned package; secondly they refer to a rather old MinGW version, significantly different from that mentioned here (see here for the differences).
Someone also mentions MSYS2, which is a modern Cygwin fork, but again I am not interested to Cygwin (as whole), but to the said package.

Some of you might not be aware of this package, and in fact, if you google for "mingw64-x86_64", you don't find anything relevant for the Cygwin package, and most likely land on the general version, and this is why I am posting here.

antonio
  • 9,285
  • 10
  • 59
  • 113
  • 1
    Closely related, perhaps a duplicate: [What's the difference between Cygwin and MinGW?](http://stackoverflow.com/q/771756/183120) – legends2k Sep 19 '14 at 15:18
  • Use [MSYS2](http://sourceforge.net/p/msys2/) for the shell emulation, and MinGW to produce native Windows executables; using Cygwin would produce a executable that depends on cygwin1.dll which emulates lot of POSIX behaviour on Windows. – legends2k Sep 19 '14 at 15:25
  • Have you found the answer for this? It's a pretty interesting question, I'm sorry people failed to understand it. Perhaps if we check the executables in the package... – André Chalella Oct 18 '15 at 20:16

1 Answers1

2

TL;DR: Install Cygwin and the package mingw64-x86_64-gcc-core.


if the Cygwin package is different from a standalone MinGW-w64

They are the same.


  1. MinGW - this is the project that can be found at mingw.org and
    sourceforge.net/projects/mingw. This project has been superceded by the MSYS2 and MinGW-w64 projects.

  2. Cygwin environment - Unix-like environment, namely Bash.

  3. Cygwin compilers - these are the packages gcc-core and cygwin32-gcc-core which include the files x86_64-pc-cygwin-gcc.exe and i686-pc-cygwin-gcc.exe. These compilers create programs that rely on cygwin1.dll.

  4. MSYS2 environment - Unix-like environment, namely Bash. This is an update to the MSYS environment provided by the old MinGW project.

  5. MinGW-w64 compilers - these are the packages mingw64-x86_64-gcc-core and
    mingw64-i686-gcc-core which include the files x86_64-w64-mingw32-gcc.exe and
    i686-w64-mingw32-gcc.exe. These compilers create Windows native programs that do not rely on cygwin1.dll.

What do the C compilers on Cygwin generate?

Community
  • 1
  • 1
Steven Penny
  • 82,115
  • 47
  • 308
  • 348