Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Does cygwin work line wine, providing a compatibility layer inside a foreign os?

share|improve this question

1 Answer 1

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.

share|improve this answer
1  
so 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
3  
Yes, at the core of Cygwin is the Cygwin DLL (dynamic-link library), which plays a similar role in Cygwin as glibc does in Linux. However, instead of implementing the POSIX API in terms of Linux kernel calls, it implements it using the Windows API and the underlying NT API. For some things the mapping is straightforward, but for others, e.g. fork(), it is complex and slow. –  ak2 Sep 30 '11 at 18:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.