Install GCC
The quickest way to install GCC is to install the complete Cygwin environment on your machine. Cygwin is a Windows environment similar to Linux. It includes a DLL that provides a basic subset of UNIX functionality and a set of tools above it. After Cygwin is installed, you can ignore it. Even if you are a fan of command lines, you can still find that you are more comfortable.
Make sure that you have a fast Internet connection. The GCC compiler and related utilities are about 50 MB in size. Check whether your connection requires a proxy server. This can be done through your Internet browser options:Tools> Internet Options> connection> LAN SettingsTo confirm.
Make sure to install this program under your administrator account and select "all users" for installation.
Direct your Internet browser to www.cygwin.com. In the center of the screen is a black-green "C" logo with the title "Install or update now .". Click on the link to download a small program setup.exe (250KB ). This installer will guide the Cygwin environment installation or update process on your machine.
Run the installer
Download setup.exe to a known location, such as the desktop, and then run it.
It will open the Installation Wizard, as shown in:
Figure 1. Installation Wizard of Cygwin Environment
ClickNextButton.
Select Download location
On this page, select "Install from Internet ".
Figure 2. Select the installation type
ClickNextButton.
Select an installation directory
On this page, select the directory where Cygwin is executed.
Set the remaining options shown in figure 3.
Figure 3. Select an installation directory
ClickNextButton.
Select a temporary installation directory
On this page (figure 4), select a temporary directory for the installation package. After Cygwin is installed, you can delete this directory and its content.
Note that the installer remembers this directory and only downloads the version later than the package in this directory during update. If you delete this directory and reinstall it,SetupAll the content you selected will be reinstalled regardless of whether the package's installer already exists in the running directory.
Figure 4. Select a temporary installation directory
ClickNextButton.
Specify your Internet connection
On this page (figure 5), specify the Internet connection. If you have a proxy server, select "use IE5 Settings", or obtain the server name from your browser options, select use proxy, and enter the host name and port number of the proxy server.
Figure 5. Select the connection type
ClickNextButton.
Select Download Site
On this page (figure 6), select a download site. Because these sites are obligated images, it is risky to select a download point (usually they are available but sometimes unavailable ). Generally, try the site that is closer to you.
Figure 6. Select a download site
ClickNextButton.
Select a package for Installation
On this page, you will select the package to install. By default, GCC is not installed in the Cygwin basic package. Therefore, you must modify the default settings.
Move the mouse overDevelOn the plus sign (+) of the edge, click it to expandDevelClass.
Figure 7. Select a package for Installation
If you have not determined which ones do not need them, you 'd better download them All. Click "All" and the default value is install. It is completely installed. Ensure the use of the GCC editor.
You can see that there are many portals in Devel, and only three of them are what you need. The order is as follows:
Binutils
Gcc
Gcc-mingw
Not all the default basic packages need to run GCC, but they are not very large, so to simplify them, install them.
Note that it is easy to select the wrong package or version, especially when you reinstall it, because the cycle button in the selection window is not standard. In this step, we recommend that you be more careful, especially when there are multiple GCC versions.
To select the three packages, click the columnNewUntil the version number of each package is displayed. According to the installed version on your machine and the appropriate version on the image, the inclusion port loops between icons:
If multiple versions are available, select the largest number. To download the binary file, make sure that the check box in the "Bin" column is selected.
Figure 9. Download a binary file
Download complete
After three packages are selected, Cygwin accesses the selected image host and downloads the three packages and the default basic package. Depending on your connection speed, this will last for several minutes. During installation, many pop-up windows will be opened and closed.
Because it is an obligation to store images installed by Cygwin, it is sometimes unavailable or overloaded. If the selected image does not respond, click Cancel (Cancel), Which will terminate the entire installation program.
The only solution is to re-install and select another image, which is frustrating. Fortunately, the installer remembers most of what you did last time, so the default setting is usually used. Be careful when selecting the correct package again, because you will not be able to select the content for later installation.
SetupProgram and then ask whether to create a Cygwin shortcut on your desktop or start menu. This shortcut key starts Cygwin shell (bash), which is not required for the usage of DB2 in our plan, but is useful for testing our installation. ThereforeSetupCreate at least one desktop shortcut. We will use it after installation.
Finally, clickFinishButton. We will test the installation result later.
Figure 10. Complete installation