Hi Fortran experts,
Martin again, sorry for another question.
I am playing around with the source code of Introduction to Computational Economics Using Fortran.
in my previous post, with your help, I am able to run the code prog02_02.f90 with toolbox module: toolbox.f90 located in the same folder.
but I have to copy the toolbox.f90 everytime when I need to compile a new source code.
I am trying to find out how to compile the two code in separate directory.
so I put toolbox.f90 in a folder called toolbox_module: it contains toolbox.f90, toolbox.mod, toolbox.o
when I run: gfortran prog02_02.f90 -I cygdrive/c/users/yangzhe/downloads/ce-fortran-main/toolbox_module
it gives me error:
15 | use toolbox
| 1
Fatal Error: Cannot open module file ‘toolbox.mod’ for reading at (1): No such file or directory
looks like my module directory in cygwin is the reason that it could not find the toolbox.mod file which I can see in the folder of toolbox_module.
do i have to copy all the source code to cygwin directory system? or I can change the directory structure to run it?
Many thanks
Martin