Search code examples
cygwin

Differences between compilers in Cygwin


In Cygwin a search for g++ shows:

  • gcc-g++
  • mingw-gcc-g++
  • mingw64-x86_64-gcc-g++

What are the differences between these?


Solution

  • Binaries built with Cygwin's gcc-g++ link against cygwin1.dll which is an implementation of the POSIX API for Windows.

    mingw64-x86_64-gcc-g++ is instead part of the Mingw-w64 toolchain which builds native Windows applications that do not depend on Cygwin. The mingw-gcc-g++ on your system is probably either a symlink to this, or is the version that produces 32-bit binaries.

    You can verify this difference by inspecting the import tables of a "hello world" program built with each using objdump -x hello.exe.