LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gfortran

GNU Fortran compiler

TLDR

Compile Fortran file
$ gfortran [source.f90] -o [output]
copy
Compile with optimization
$ gfortran -O3 [source.f90] -o [output]
copy
Enable warnings
$ gfortran -Wall [source.f90] -o [output]
copy
Debug build
$ gfortran -g [source.f90] -o [output]
copy
Link math library
$ gfortran [source.f90] -o [output] -lm
copy

SYNOPSIS

gfortran [options] files...

DESCRIPTION

gfortran is the GNU Fortran compiler, part of GCC. It compiles Fortran 77, 90, 95, 2003, and 2008 standards to native executables.The compiler provides extensive optimization, debugging support, and interoperability with C code. It benefits from GCC's mature infrastructure.gfortran is the standard open source Fortran compiler for scientific computing.

PARAMETERS

FILES

Fortran source files (.f, .f90, .f95).
-o FILE
Output filename.
-c
Compile only, no linking.
-g
Generate debug info.
-O LEVEL
Optimization level (0-3).
-Wall
Enable warnings.
-l LIBRARY
Link library.
--help
Display help information.

INSTALL

sudo apt install gfortran
copy
sudo apk add gfortran
copy
brew install gfortran
copy
nix profile install nixpkgs#gfortran
copy

CAVEATS

Standard compliance varies by feature. Array bounds checking optional. Legacy code may need adaptation.

HISTORY

gfortran replaced g77 as GCC's Fortran compiler starting with GCC 4.0. It supports modern Fortran standards while maintaining compatibility with older code.

SEE ALSO

gcc(1), f2py(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid