gfortran Command Examples

Preprocess and compile Fortran source files, then assemble and link them together. More information: https://gcc.gnu.org/wiki/GFortran.

gfortran {{path/to/source1.f90 path/to/source2.f90 ...}} -o {{path/to/output_executable}}

gfortran {{path/to/source.f90}} -Wall -g -Og -o {{path/to/output_executable}}

gfortran {{path/to/source.f90}} -o {{path/to/output_executable}} -I{{path/to/mod_and_include}} -L{{path/to/library}} -l{{library_name}}

gfortran -S {{path/to/source.f90}}

gfortran -c {{path/to/source.f90}}