In this new version (13th July 2000) Cygnus GNU-Win32 C/C++ compiler
no longer installs via a commercial Windows Wizard but a new Windows programs which installs off the internet.
(a recent version of the installer did this via a DOS style program). Please keep in mind that the installer
seems to still be in development so some of these screen dumps may not match exactly.
The other major changes over the old installation:
Also refer to: Scientific Fortran Links and Creating GNU G77 Fortran Compiler compatible Dynamic Arrays (Automatic Arrays/Dynamic Memory Allocation)
|
The installer for the Cygnus compiler for Windows can be downloaded from
a variety of sources as defined below. Just go into the "latest" directory
and get the setup.exe file and put it into a temporary directory. (e.g., c:\temp)
If you have problems obtaining the programs via FTP, it could be that this is a problem with your firewall. A quick fix is to use the following HTTP address.
|
Installing the CompilerIn the Windows explorer run the setup.exe file you just downloaded to be given the following screen.
|
If you are on a modem or wish to install on several machines, you may like to
Download from Internet to Current Directory so that you have a complete
copy of the install files that you can then use at a later time on a variety of
machines. However, the following Internet install does load all the install
files down as part of the install (and does not delete them)
For this example, we will go for Install from Internet as the example machine has a permanent high speed internet connection.
The Cygwin installer will then prompt the directory you wish to install into. By default, confirm the selection of c:\cygwin.
|
The following options can seem minorly confusing but go for Use IE5 Settings.
If you have a firewall or are forced to go via a proxy server, you may have to
configure your proxy settings (which don't seem fully functional on the July 13th 2000
version of the installer).
|
Cygwin will then download a list of Mirror sites.
|
Select the mirror that looks closest or select "other" to insert a custom
web or ftp address. In this case, we will select the CCP14 mirror by
typing the corresponding number; after which Cygwin will start downloading
and extracting the distribution files. This may take a while depending on
the speed of your CPU and internet connection.
Also, as mentioned, if you have trouble with an FTP download (firewalls can have this effect, try switching to an HTTP based site) (If performing an update, the Cygwin installer will refresh the required distribution files and if nothing needs to be updated, will report this)
|
On completion, the Cygwin installer will exit, having created the
following directory system.
You may like to delete the distribution files now remaining in your temporary directory (in this case C:\temp) Now edit your c:\autoexec.bat file and add the following line so that the c:\cygwin directory is put in the default path (using sysedit is a user friendly way of doing this): SET PATH=%path%;c:\cygwin Now reboot the computer for the change to the autoexec.bat file to take effect. |
Just type cygwin to enter the Cygwin bash shell to start being happy.
For a first time, this will create a user area in the c:\cygwin\home\ directory.
This behaviour can be over-ridden in the Cygwin install.
|
Using the C compilerAfter runing cygwin to bring up the Cygwin Bash interface. You can now start compiling up programs including the following "Hello World" program to test things out.
#include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } Cygwin comes with a vi/vim editor those who like this type of thing. Though the freeware PFE editor for Windows is very good.
Build the executable using the command gcc hello.c -o hello.exe
To run of these programs, you may have to include the CYGWIN1.DLL file in the present working directory. (located in the c:\cygwin\bin directory) |
Using the GNU Fortran G77 compilerType cygwin to bring up the Cygwin Bash interface. For Fortran, you can build a "Hello World" program and compile it to test things out. PROGRAM HELLO DO 10 I=1, 10 PRINT *, 'Hello World #', I 10 CONTINUE END Build the executable using the command g77 -o hello.exe hello.for To run of these programs, you may have to include the CYGWIN1.DLL file in the present working directory. (located in the c:\cygwin\bin directory)
|