Fortran compilation in LINUX:
This makes an executable [outputfilename].
gfortran programfilename.f -o outputfilename
If you omit the outputfilename when compiling, an executable [a.out] will be made by default.
- To run it:
gfortran invokes the newer (fortran 90 and beyond) GNU compiler. By design this is compatible with the simpler (more colloquial) fortran 77 and earlier. (f77, fort77, etc). Benign neglect of detail in older programs will not necessarily be tolerated in later compilers.
To invoke the library LAPACK:
Link to the library during compilation:
The executable will include the library parts needed. There is no change in the execution command:
gfortran programfilename.f -o outputfilename -llapack