cannot open fortran module in ubuntu -
i wring fortran code in linux. module file in *.f90 file. "program main" in *.f90 file. when tried compile code in ubuntu "gfortran main.f90", errors said can't find module file.
program main use module_name
just now, see files compiled alphabetically. if reason, in big trouble. because program has called many subroutines , functions in different f90 files. how resolve problem? thanks.
suppose have file containing main program main.f90
, file containing module mod.f90
. correct way compile , generate executable named main
be
gfortran mod.f90 main.f90 -o main
you have not specified module file while compiling therefore unable compile
Comments
Post a Comment