Does cygwin work line wine, providing a compatibility layer inside a foreign os?
Asked
Active
Viewed 2,578 times
1 Answers
29
Does Cygwin work like wine? No.
Does it provide a compatibility layer inside a foreign OS? Yes.
Wine can run Windows executables on Linux, but Cygwin cannot run Linux executables on Windows. Instead, Linux programs have to be compiled specifically for Cygwin, whereby the aim of the Cygwin project is to make that as straightforward as possible, i.e. it's aiming for source compatibility rather than binary compatibility.
However, Winelib, which is part of the Wine project, essentially is Cygwin in reverse: it provides a source compatibility layer that allows Windows programs to be compiled into Linux executables.
ak2
- 12,395
- 1
- 18
- 14
-
1so Cygwin is a library as well? A layer of general functions which work on windows that linux commands can map to? thanks – Vass Sep 30 '11 at 16:59
-
5Yes, at the core of Cygwin is the Cygwin DLL (dynamic-link library), which plays a similar role in Cygwin as [glibc](http://en.wikipedia.org/wiki/Glibc) does in Linux. However, instead of implementing the [POSIX API](http://en.wikipedia.org/wiki/POSIX) in terms of Linux kernel calls, it implements it using the [Windows API](http://en.wikipedia.org/wiki/Windows_api) and the underlying [NT API](http://en.wikipedia.org/wiki/NT_API). For some things the mapping is straightforward, but for others, e.g. [fork()](http://en.wikipedia.org/wiki/Fork_%28operating_system%29), it is complex and slow. – ak2 Sep 30 '11 at 18:55
-
Is there a closer equivalent to Wine for running linux programs on windows? – Alex Flint Apr 04 '16 at 16:40