Cygwin - alternative
UWIN - done reading - done reading - compiling


What is Cygwin?

Cygwin is a set of libraries and tools that allow us to re-compile Linux software so that they can be run on Windows.

How can we install Cygwin?

  1. Download the installer
  2. Run the installer
  3. Add Cygwin path to the Windows Environment Variable:
    1. Click on the Start menu
    2. Right click on Computer
    3. Select "Properties"
    4. Click on "Advanced system settings"
    5. Click on "Environment Variables"
    6. In the system variables section, locate the path variable and click edit, and append ;C:\Cygwin\bin
    7. Click OK a couple of times.

How can we use Cygwin?

Once installed, you can launch the Cygwin shell, which is basically a terminal window, or a command prompt for executing Unix commands. You can launch the Cygwin shell from the Windows Start menu. The Cygwin shell starts in the C:\Cygwin\home\<user> folder, but when you do a pwd, it display /home/<user>. This is your Unix home directory.

If you need to use a Cygwin program to read or write a file located outside of c:\cygwin, you can use a pathname beginning with /cygdrive/c/ for this purpose. If you have a Windows d: drive, use /cygdrive/d/ in the same way to access its contents from Cygwin programs.

Both pwd and ls work in the normal Windows command prompt. You can also see that /cygdrive/c is automatically added to the location.

For example, to determine the MD5 checksum of a file:

md5sum /cygdrive/c/Khai/

How can we determine the version of Cygwin?

cygcheck -V
uname -a

How can we determine if the Cygwin that we have is 64-bit or 32-bit?

uname -a

If we are using 64-bit, we'll see x86_64, otherwise, we are using 32-bit.

How can we install a package manager?

lynx -source > apt-cyg
install apt-cyg /bin

How can we install additional packages?

apt-cyg install libtirpc-devel

How can we install all the packages that are required for compiling software?

I wish that someone can provide me with a apt-cyg command that would download and install all the packages that are typically needed for compiling software. Maybe someday I will create such command myself.

apt-cyg install wget
apt-cyg install clang binutils bison make cmake flex clang-analyzer ccache libtool perl pcre libpcre-devel zlib readline pkg-config libiconv libiconv-devel gcc-core gcc-g++ gcc-objc gcc-objc++ autoconf autogen automake diffutils sharutils gccmakedep libapr1 libapr1-devel libaprutil1 libaprutil1-devel autobuild libclang libclang-devel libclang-devel-static

How can we compile Linux / Unix software on Cygwin?

Use the standard compilation:

make install

Check with the software documentation for detail on various options that we need to specify for the ./configure command.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License