Forrest logo
back to the gfortran tool

gfortran:tldr:f4b09

gfortran: Compile multiple source files into an executable.
$ gfortran ${path-to-source1-f90 path-to-source2-f90 ---} -o ${path-to-output_executable}
try on your machine

This command is invoking the GNU Fortran compiler (gfortran) to compile one or more Fortran source code files and create an executable file.

Here's a breakdown of the command:

  • ${path-to-source1-f90 path-to-source2-f90 ---}: This specifies one or more Fortran source code files that need to be compiled. Each source file is separated by a space. Replace ${path-to-source1-f90 path-to-source2-f90 ---} with the actual paths to your Fortran source code files. The .f90 extension typically indicates Fortran source files.

  • -o: This option specifies the output file name for the compiled executable. Replace ${path-to-output_executable} with the desired path and name for the output executable file.

Putting it all together, the command will compile the specified Fortran source code files together and produce an executable file at the specified output path and name.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gfortran tool