Executable file generated using GCC under cygwin

Despite widespread rumours, Cygwin is not a Linux emulator, i.e. it doesn’t produce or run Linux executables. For that you’ll need a virtual machine or coLinux.

Instead, Cygwin is a compatibility layer, which aims to implement as much as possible of the POSIX and Linux APIs within Windows. This means that programs have to be compiled specifically for Cygwin, but it also means that it’s better integrated with Windows, e.g. it lets you mix POSIX and Windows APIs in the same program.

It’s the cygwin1.dll that provides that compatibility layer. If you build non-Cygwin executables using gcc-3’s -mno-cygwin switch or one of the MinGW compilers, then of course you can’t use any POSIX/Linux-specific APIs, and any such calls will need to be replaced with Windows equivalents.

Leave a Comment