Installing Cygwin


Before you can use the GMP library, you need to have a platform that you can use it on. As is usually the case with GNU software, the assumed platform is Linux, or some form of UNIX. This book is intended for .NET programmers, which makes the implicit assumption that you are programming on some flavor of Microsoft Windows. The resulting problem is that the GMP library will not run directly on Windows without some help.

To solve this problem, we use an open -source product from Red Hat, named Cygwin. Cygwin provides Microsoft Windows with a UNIX programming environment. This is comprised of an emulation layer for POSIX API support and a set of UNIX command-line utilities, including gcc, make, and so on. The Cygwin.dll library provides a very useful subset of the standard UNIX programming environment. You can learn more about it at the Cygwin home page: http://cygwin.com/.

The GNU GPL also covers Cygwin. This means that the source code of any application that you build using Cygwin must also be distributed freely along with those applications unless the Cygwin buy-out license is purchased from Red Hat.

The Cygwin installation program, named setup.exe , can be downloaded from http://www.cygwin.com/setup.exe. You can then install Cygwin by running this setup.exe program. However, the default installation provides only a basic set of packages. In particular, the default installation package does not include the utilities you will need to build programs, such as gcc, binutils, and make. These utilities are provided under the Devel category of Cygwin packages. Therefore, when you run setup.exe , make sure that you select the install option for the Devel category, as described in the next paragraph.

When you run setup.exe , you will see the resulting wizard dialogs, as shown in Figures C-1 to C-9. Notice that in Figure C-7, you must click on the Devel node to change it from Default to Install. This causes the program development utilities to be included in your Cygwin installation.

Figure C-1. Cygwin Setup Dialog 1.

graphics/cfig01.gif

Figure C-9. Cygwin Setup Dialog 9.

graphics/cfig09.gif

Figure C-7. Cygwin Setup Dialog 7.

graphics/cfig07.gif

Figure C-2. Cygwin Setup Dialog 2.

graphics/cfig02.gif

Figure C-3. Cygwin Setup Dialog 3.

graphics/cfig03.gif

Figure C-4. Cygwin Setup Dialog 4.

graphics/cfig04.gif

Figure C-5. Cygwin Setup Dialog 5.

graphics/cfig05.gif

Figure C-6. Cygwin Setup Dialog 6.

graphics/cfig06.gif

Figure C-8. Cygwin Setup Dialog 8.

graphics/cfig08.gif

Cygwin provides a UNIX-style command-prompt window. All of the GNU tools can be used at the Cygwin command prompt, using normal Windows path names . To make this available from any directory, you should add the appropriate path (c:\cygwin\bin by default) to your PATH environment variable, as shown in Figure C-10, so that you can use the bin utilities in any directory.

Figure C-10. Adding Cygwin to the PATH environment variable.

graphics/cfig10.gif



.NET Security and Cryptography
.NET Security and Cryptography
ISBN: 013100851X
EAN: 2147483647
Year: 2003
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net