Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Cygwin and Wine both are compatibility layers. One is implementing POSIX on Windows, and the other is implementing Windows API on *nix. Why is it necessary to recompile binaries to run on Windows with Cygwin, while you can run Windows applications using Wine without recompilation?

share|improve this question

migrated from Oct 6 '12 at 10:04

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

Because there is one Windows (albeit in different versions) on one platform (x86) but gazillions of *nixes (SysV, BSD, Linux, Dec, ...) multiplied by their platforms multiplied by their supported CPUs.

Sharing code on *nix was always sharing the source due to that variety.

share|improve this answer

There isn't really a good answer to this question other than "they're different". It would, in theory, be possible to produce a Cygwin-like layer for *nix which would enable you to recompile Windows applications on *nix and a Wine-like layer for Windows which would enable you to run *nix applications without recompilation - but that isn't what people did.

share|improve this answer
+1: If I have a Unix app I want to run on Windows, I can probably get the source code. That's very much not the case for a Windows app. Insisting on a recompile is probably easier, but if that was necessary for Wine, there would be very few apps that it could support. – me_and Oct 6 '12 at 17:09
Winelib allows Windows applications to be compiled for Unix (with various limitations). – ak2 Oct 6 '12 at 18:04

Cygwin provides a Linux enviroment on a computer with a special arquitechture, is a simulator of a computer. By the other hand, Wine provides a enviroment where the Windows instructions are transformed to Linux instructions through libraries. Windows can be execute only on x86 or x64 (now ARM too) and Linux can be execute on multiples.

share|improve this answer
This is very vague, to the extent that I can't tell what it actually means. Also, it sounds like it's backwards. If Wine provides support through libraries, I'd expect programs to need recompiling to use those libraries; if Cygwin were a virtualization environment, I'd expect programs not to need recompiling to use that simulated computer. – David Richerby Jun 14 '15 at 8:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .