198. Compilation can fail if there is no main program or if a USEd module has not been compiled.#
topic: Compiling
Note
This tip is a draft1.
gfortran m.f90
gives an error
undefined reference to `main’
if m.f90 does not contain a main program.
gfortran -c m.f90
gives an error like
Cannot open module file ‘x.mod’
if the file containing module x has not previously been compiled.
gfortran m.f90
— FortranTip (@fortrantip) April 21, 2022
gives an error
undefined reference to `main'
if m.f90 does not contain a main program.
gfortran -c m.f90
gives an error like
Cannot open module file 'x.mod'
if the file containing module x has not previously been compiled.
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.