Windows/Cygwin users can have a free Fortran 95 compiler!
ATTENTION: Make sure you have installed gmp, mpfr, and mpc libraries with Cygwin setup before going any further.
Download the tarball in a suitable directory. It really does not matter where.
NOTE: Windows Explorer has a nasty habit of changing the extension from .tar.bz2 to .tar.tar . If this happens, just rename the archive after downloading. All will be well if the extension is correct.
Install using the following command:
- tar -xjvf gfortran-4.5-Cygwin-i686.tar.bz2 -C /
This will install gfortran in /usr/local/gfortran. You can then either set /usr/local/gfortran/bin to be in your search path or set up a link in your local ~/bin directory with this command as an example:
- ln -s /usr/local/gfortran/bin/gfortran.exe ~/bin/gfc
Alternatively you can put links in the /usr/local/bin like this:
- ln -s /usr/local/gfortran/bin/gfortran.exe /usr/local/bin/gfc
You can read the man pages for gfortran with this:
- man -M /usr/local/gfortran/man gfortran
Assuming ~/bin is in your search path, you can invoke gfortran with:
- gfc --version
Here is an example session:
> cd /home > wget gfortran-Cygwin-i686.tar.bz2 > tar -jxvf gfortran-Cygwin-i686.tar.bz2 -C / > ln -s /usr/local/gfortran/bin/gfortran.exe ~/bin/gfc > gfc --version GNU Fortran 95 (GCC 4.4.0 20070210 (experimental))... Copyright (C) 2005 Free Software Foundation, Inc. GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING
Jerry D Enjoy!