Install FORTRAN Compiler for Cygwin

http://www.champslab.com/wiki/index.php?title=Install_FORTRAN_Compiler_for_Cygwin

Install FORTRAN Compiler for Cygwin

The following document provides instruction on how to install a FORTRAN compiler with use in Cygwin (gfortran).



To begin with, go ahead and update Cygwin to the latest version. Go to the Cygwin Home Page and click on the "Install or update now!" icon.

Save the executable file to your computer.

Click on setup.exe and click Next.

Click Install from Internet.

Leave defaults and click Next.

Note: You may change the "Install For" options if need be.

Click Next. Click Next.

Pick a download site and click Next.

Maximize the "Select Packages" screen. Expand the "Devel" option and enable all packages that begin with "gcc." Click Next and finish the installation.


Go to the Binaries available for gfortran website and download the latest Cygwin build (Fourth bullet down in the Windows section).

Save the file.

Note: The file name extension may change from .tar.bz2 to .tar.tar. If this is the case rename the extension back to .tar.bz2.

Open Cygwin and go to the location in which you saved the file (ex: cd C:/gfortran/).

Install using the following command:

tar -xjvf gfortran-4.4-Cygwin-i686.tar.bz2 -C /

Migrate to the Unix emulator route drive (/) (One level higher than the Cygwin drive) and input the following command:

ln -s /usr/local/gfortran/bin/gfortran.exe ~/bin/gfc

If no errors occur type the command:

gfc --version
This command will invoke gfortran and display its version information. If this is successful the FORTRAN compiler has been installed correctly.

If problems arise installing gfortran the following websites may be useful:

Binaries available for gfortran
Installation Instructions

FORTRAN Compiler for Windows

This method explains how to install a Windows based FORTRAN compiler.

Download  gfortran for Windows and install.
To compile open the command prompt (Start > Run > cmd) and migrate to the FORTRAN file you wish to compile. Type  gfortran code.f95 -o code.exe. This creates an executable named code.exe from code.f95.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值