Apple-style installers of gfortran for Mac OS X are made available for download here. To install any of them, you need to have the Apple Developer Tools installed, as well as 'command line developer tools'. These can be downloaded from http://developer.apple.com/ (free registration required). Click on Downloads > Developer Tools in the sidebar. Find the latest version supported on your platform: XCode 3.1.4 for Leopard, XCode 4 for Snow Leopard, XCode 4.6.3 for Lion, Xcode 5.0.1 for Mountain Lion and Mavericks.
HPC Mac OS X offers GCC builds, which include gfortran MacPorts (package name, e.g., 'gcc48') - the fastest way to get a developer version of GCC. MacPorts comes with a packing software, but all software is compiled before installation. This is how I installed gfortran on my Mac: Visit hpc.sourceforge.net, and select a binary distribution for your version of Mac OS X, e.g. Gfortran-snwleo-intel-bin.tar.gz for Snow Leopard. Download the file and open the download directory in Terminal. This is how I installed gfortran on my Mac: Visit hpc.sourceforge.net, and select a binary distribution for your version of Mac OS X, e.g. Gfortran-snwleo-intel-bin.tar.gz for Snow Leopard. Download the file and open the download directory in Terminal.
- Gfortran free download. CAELinux CAELinux is a live DVD Linux distribution dedicated to open source engineering with a focus on Compu.
- To install gcc compiler on Mac OS X, you need to download and install “Command Line Tools for Xcode”, which is available in Apple’s developer page. See following steps: 1.
Technical details
The gfortran package for MacOS X installs all files in the /usr/local/gfortran directory, and a single symbolic link (/usr/local/bin/gfortran). If you need to uninstall it (since Apple packages do not support auto-uninstalling), you need to type the following command in a terminal, as administrator:
As every time you use administrator privileges, double check your command and make no mistake!
This page gathers links to all unofficial gfortran binary packages people regularly build, based on the current development gfortran source code.
- Windows Free solitaire downloads for mac.
- MacOS
- GNU/Linux
- Build GNU Fortran from source
Note: There do not exist any official FSF/GNU/GCC binary builds (only source packages). Most of the builds below come from gfortran maintainers but not all.
Windows
If in doubt, or if you don't know what Cygwin and MinGW are, the package for you is the MinGW ('native Windows') package!
- MinGW for Win64: The Mingw-w64 project has regularly updated snapshots of compilers generating 64-bit Windows executables. They provides several compilers, which run on Windows (32-bit and 64-bit Windows), Cygwin, Linux, and Darwin/MacOS - and which generate binaries for 32bit or 64bit Windows. The file name pattern is <target>-<host>-<option-version>-<date>; thus, mingw-w64-bin_x86_64-mingw_20100527.zip is a compiler targeting 64bit Windows (mingw-w64) but also running ('host') on 64bit Windows (xx86-64-mingw); you might search for the file in Toolchains targetting Win64 (Personal Builds or Automatized Builds).
- MinGW build ('native Windows' build)
- Official MinGW builds (only releases), last seen was 6.3.0 (2017-05-30)
- The MinGW for Win64 project has also binaries for 32bit Windows; e.g. mingw-w32-bin_i686-mingw_<date>.zip runs on and generates binaries for 32bit Windows (cf. above); you might search for the file in Toolchains targetting Win32 (Personal Builds or Automatized Builds).
- TDM GCC: MinGW/MinGW-W64 Builds
- MinGW 32/64bit builds by www.Equation.com (builds were announced at comp.lang.fortran; note - equation.com is not affiliated with any MinGW or GCC developer. Use at your own risk)
- Cygwin: The Cygwin project offers up-to-date builds of GCC and gfortran Maya download for mac.
macOS
The gfortran maintainers offer nice Apple-style installers for macOS: https://github.com/fxcoudert/gfortran-for-macOS/releasesDetailed instructions can be found here.
Other projects packaging GCC (and gfortran) binaries for Mac include:
- Homebrew offers the latest stable gfortran release as part of the 'gcc' package.
- HPC Mac OS X offers GCC builds, which include gfortran
- MacPorts (package name, e.g., 'gcc48') - the fastest way to get a developer version of GCC. MacPorts comes with a packing software, but all software is compiled before installation. For the developer version, the 'Portfile' is updated approx. weekly.
- Fink offers GCC packages (all released versions) - similar to MacPorts, but also offers binaries; it does not have the developer versions, just the releases.
GNU/Linux
![Mac Mac](/uploads/1/3/3/8/133895927/592135961.png)
Most Linux distributions offer gfortran packages, some have also builds for the experimental versions
Nightly builds are available at:
Install Gfortran On Windows
- 32-bit processors (i686)
- Download from gfortran.com
- Installation instructions
- 64-bit AMD-compatible processors (x86_64, AMD64,Intel64, em64t)
- Download from gfortran.com (README, nightly builds, 4.3 to 4.9 snapshots)
- gcc-4.8-infrastructure package (GCC 4.8 and later; for GCC 4.3 to 4.7 use gcc-infrastructure), which contains required libraries (GMP, MPFR, MPC, etc.) - simply unpack in the 'gcc-trunk' (or 'gcc-4.6' or ..) directory
- To unpack .xz files: Use xzcat with tar. It is contained in pre-build xz package, if you don't have it.
- Needs to be updated: Installation instructions
Building from Source
See also InstallingGCC and http://gcc.gnu.org/install/
Download Gfortran For Mac
- Obtain the source code either via
- subversion
- git
- Bazaar
- unpacking a tarball
- You should have the right versions of GMP, MPFR and MPC (and optionally for Graphite: CLOOG and ISL) installed, which you can download from ftp://gcc.gnu.org/pub/gcc/infrastructure/ (They can also be automatically build with GCC.)
- Note: You can use ./contrib/download_prerequisites to download them.
- Follow the instructions; in a nutshell, you will do
- create a build directory, e.g. gcc-build underneath the source directory
- go to the build directory and run configure from there; for instance: ./configure --prefix=$HOME/gcc-trunk --enable-languages=c,fortran
- Free download video player for mac. run make
- run make install
Gfortran Binaries
Useful configure options: --enable-checking=release which disables some compile-time checks which slow down the compiler; --disable-bootstrap which speeds up the build but uses the system compiler and disables some consistency checks; --disable-build-poststage1-with-cxx (for 4.7 or higher) avoids building GCC with a C++ compiler, esp. useful if no C++ should be compiled; --disable-libstdcxx-pch speeds up the compilation a bit by not creating pre-compiled header files.