This topic was published by DevynCJohnson and viewed 1352 times since "". The last page revision was "".
- Topics - 443
With Linux becoming popular and Unix and POSIX being well formed standards, many people may need or want to use such utilities and protocols on Windows. Thankfully, there is a way to run Linux tools on Windows and run applications in Windows that were compiled on Linux.
First, there is Cygwin (https://www.cygwin.com/) which provides a Unix-like environment for Windows. Cygwin provides a Unix-like command-line and the POSIX API. Thanks to Cygwin, many Linux and Unixoid applications can be ported to Windows and run natively. For instance, KDE3, Apache, GNOME, etc. have been ported to Windows via Cygwin. Cygwin also allows Windows to run daemons like the usual Windows services.
Unixoid applications running in Cygwin execute and behave like normal/native Windows applications. They can also access Windows libraries and the Windows API. However, users must have the source code and compile it on the Windows system. In other words, users cannot install Linux applications from Debian or RPM packages.
Cygwin allows many interfaces to be usable and compatible. The POSIX system calls are available through WIN32 syscalls. Also, the Solaris API for access control lists (ACLs) converts easily to the Windows NT ACL system. UTF-8 (used by Linux) and UTF-16 (used by Windows) are transparently converted to each other. The /etc/passwd and /etc/group systems are mapped (via the GECOS field) to be equivalent to the SIDs used by Windows.
Window's drive-letter scheme is mapped to a Unix-style path. Drive C is "/cygdrive/c". /dev/ and /proc/ are also supported. In fact, /proc/registry/ offers a filesystem-interface to Windows' registry.
The various mappings and compatibility layers are not 100% Unix or POSIX compliant. For instance, the mount command on Cygwin is a modified Unix mount command made specifically for Cygwin. Also, the fork syscall is not entirely complete. Symbolic links (soft links) are not POSIX-compliant.
The Cygwin command-line is BASH and the included terminals are Xterm, Mintty, and rxvt-unicode.
Cygwin supports 32 and 64-bit Windows systems.
Cygwin/X is an X11 display server for Cygwin and is a port of Xorg (http://x.cygwin.com/).
Minimalistic GNU for Windows (MinGW - http://www.mingw.org/) provides a way to use the GNU developer tools (such as GCC) on Windows. In other words, MinGW is a GNU Compiler Collection (GCC) port to Windows. Programs compiled using MinGW can be run on Windows. Also, the MinGW cross-compilers allow developers to compile programs for Windows from a Linux system.
The MinGW compilers supports C/C++, Objective-C/C++, Ada, and Fortran.
Not all Unixoid applications compiled using MinGW will work on Windows. When using Linux to develop software and cross-compile, remember that some applications may not compile or port successfully. Some developers may need to change some of their code. For instance, try to use cross-platform or ported libraries such as SDL, GTK, Qt, etc.
Mingw-w64 (http://mingw-w64.yaxm.org) is a fork that provides newer features such as gcc-5.x support (while MinGW supports gcc-3.4.5).
“mingwPORTs” are user-made additions to the MinGW software collection.
Xming is an Xorg port for Windows to provide the X11 protocol and display server (http://www.straightrunning.com/XmingNotes/).
Minimal System (MSYS - http://www.mingw.org/wiki/msys) is a MinGW-related package that consists of GNU utilities. Such utilities include Bash, make, grep, and others. It is strongly recommended that MSYS and MinGW both be installed together. MSYS does not have all of the features that Cygwin can offer.
Other Cygwin-like projects exist, although they may be deprecated, unmaintained, beta-stage, old, etc. such as UnxUtils, DJGPP (DJ's GNU Programming Platform), and GnuWin32. UWIN may be usable (http://www2.research.att.com/~astopen/download/uwin/uwin.html).
MKS Toolkit appears to be an active project (http://www.mkssoftware.com/).
Cygwin is to Windows as WINE is to Linux. MinGW is a developer's suite. Applications compiled for Cygwin only work in Cygwin and applications compiled using MinGW work on Windows. Like WINE, Cygwin is not an emulator. Rather, it is a compatibility layer. Also, MinGW and Cygwin cannot provide a way to run Windows applications on Linux.
- Cygwin and MinGW Differences - http://stackoverflow.com/questions/771756/what-is-the-difference-between-cygwin-and-mingw
- RedHat Cygwin - http://www.redhat.com/services/custom/cygwin/
- Interix - http://www.mingw.org/node/30