Cygwin Toolset Download and Installation


Download/Install the Cygwin Toolset

Cygwin is a collection of GNU and Open Source tools that provide a Linux-like environment for Windows: using it we can install and use llvm (which includes the GCC compilers), Clang (which includes Clang compilers), GDB (a debugger used by both compilers), and make/cmake (tools that which we use to specify how to build -compile and link- C++ programs). Cygwin and it toolset occupy about 14 GB on disk.

In this handout you will download and install the Cygwin toolset; in the next you will download a version of CLion, an Integrated Development Environment (IDE) for using these tools (or you can choose to use these tools via a command-line).

You may want to print these instructions before proceeding, so that you can refer to them while downloading and installing Cygwin and its toolset. Or, just keep this document in your browser. You should read each step completely, before performing the action that it describes.


Cygwin Toolsest

Downloading and Installing

  1. Click Cygwin64

    The following Cygwin home page should appear in your browser.

  2. Click the setup-x86_64.exe link on that page, and use it to download that executable file: executing this file will install the 64-bit version of Cygwin.
    On some browswers you will be prompt to Run or Save this file. Choose to Save it.
    After downloading this file, its icon will appear on your screen as follows.

    Save this file for future use, in case you need to install more Cygwin tools: on my system I stored this file as C:\ZData\Installed Software\setup-x86_64.exe; I mention this because that directory will appear in later screen-shots.

  3. Double-click the setup-x86_64.exe file.

    When run, your screen will be show a message with the questions, Do you want to allow this app from an unknown publisher to make changes to your device.

  4. Click the Yes button on your screen.

    The following Cygwin Setup pop-up window should appear on your screen.

  5. Click the Next> button on this window.

    The following Cygwin Setup - Choose Installation Type pop-up window should appear on your screen.

    Ensure the Install from Internet radio button is pushed (the default).

  6. Click the Next> button on this window.

    The following Cygwin Setup - Choose Installation Directory pop-up window should appear on your screen.

    For simplicity and consistency, ensure the Root Directory is C:\cygwin64 (the default); the All Users (RECOMMENDED) radio button should be pushed (the default).

  7. Click the Next> button on this window.

    The following Cygwin Setup - Select Local Package Directory pop-up window should appear on your screen.

    This is a temporary directory in which Cygwin will create folders that it downloads files into; it will delete the files/folders here before finishing. For simplicity and consistency, use the default Local Package Directory.

  8. Click the Next> button on this window.

    The following Cygwin Setup - Select Connection Type pop-up window should appear on your screen.

    Ensure the Direct Connection radio button is pushed (this second radio button is the default).

  9. Click the Next> button on this window.

    A progress window might temporarily flash on the screen. The following Cygwin Setup - Choose Download Site(s) pop-up window should appear on your screen.

    There are many sites from which Cygwin can be downloaded. I would leave the top one (http://cygwin.mirror.constant.com) selected (the default).

  10. Click the Next> button on this window.

    A progress window might temporarily flash on the screen. In the View pull-down list, select Category if it is not already selected. The following Cygwin Setup - Select Packages pop-up window should appear on your screen. (I have midimized this window and enlarged the result horizontally)

    Notice that the Search textbox is empty.

    In the steps below you enter tool names and will specify installing Develment for each.

    At the end of this process, after selecting all packages, you will click the Next> button. Do not prematurely click the Next> button.

    First, click on the + in the square to the left of All. The contents of the Cygwin Setup - Select Packages pop-up window should now appear as

  11. (Finally!) Click the Next> button on this window.

    If this is your first installation of Cygwin, you may see the following Cygwin Setup - Review and confirm changes pop-up window on your screen (its pane contents might display different installs).

    If you have a previous installation of Cygwin, you may see the following Cygwin Setup - Review and confirm changes pop-up window on your screen (its pane contents might display different uninstalls).

    If you see either of these pop-up windows, click Next>.

    If this is your first installation of Cygwin, you may see the following Cygwin Setup - Resolving Dependencies pop-up window on your screen (its pane contents might display different information).

    If you see this pop-up window, click Next>.

  12. The following Cygwin Setup progress pop-up window should appear on your screen.

    It will cycle through the Downloading, Installing, and Running tasks. Downloading itself might take minutes (depending on your connection speed); Installing and Running can also take minutes. On my machine, with a fast connection speed, the entire process took about 15 minutes; sometimes it will pause for up to tens of seconds (often with 0% progress showing on the window); let it finish. My installation also occupied about

    Eventually this window will be replaced by the following Cygwin Setup - Installation Status and Create Icons window on your screen.

    I recommend that you leave checked the Create icon on Desktop checkbox, and uncheck the Add icon to Start Menu checkbox.

  13. Click the Finish button on this window. Place the (Cygwing64 Terminal icon) on your desktop in convenient place (especially if you plan to use this Cygwin toolset with a Command Line instead of CLion).

  14. Finally, place C:\cygwin64\bin on the Path, so that the Cygwin toolset is available for use. The following System Properties pop-up window should appear on your screen.

  15. Click the Environment Variables... button.

    The following Environment Variables pop-up window should appear on your screen.

  16. In the System variables (lower) part, scroll to line starting with Path and click that line (which should become highlighted).
    IMPORTANT: Even though you see a Path in the User variables (top part) look for Path in the lower part to change it.

  17. Click Edit... beneath this part.
  18. Copy the text C:\cygwin64\bin An Edit environment variable pop-up window should appear on your screen.
  19. Click New (upper-right)
  20. Paste the copied text (or just retype it) in the line at the bottom created by New.

    When done, the Edit environment variable pop-up window should look something like

  21. Click OK for each of the pop-up windows above, to terminate them (3 OKs total), and delete (X) the System window.

The Cygwin toolset (all the necessary programming tools) are now installed. You are now ready to install the CLion IDE; as an alternative you can also first test that you downloaded Cygwin correctly by following the instructions in Command Line Cygwin Tools.