Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to use the r.inund.fluv add-on in GRASS. I installed the gfortran compiler in order to use the script. The problem is, I do not know how to compile the files in gfortran. Im using windows

Here are the files for r.inund.fluv.

I emailed the author of the script, Roberto Marzocchi and he instructed me to do the following and I was stuck at step 4.:

Try the following way:

1) save the file r.inund.fluv within the folder named scripts within the grass main folder

2) create a file r.inund.fluv.bat in the folder named bin and copy the following row:

@"%GRASS_SH%" -c '"%GISBASE%/scripts/r.inund.fluv" %*'

3) save the file r.inund.fluv.html within the folder named doc

4) create a folder named fortran_code within your etc folder and save the four fortran code 2d_path.f90, etc etc. then try to compile the 4 fortran codes using for the binary file the same name of the source code without any extension e.g (2d_path.f90 become 2d_path)

share|improve this question
+1 for being the first to mention Fortran on this site and for being brave enough to dive in! – whuber Mar 5 '11 at 22:28
up vote 1 down vote accepted

How about f90 -o 2d_path 2d_path.f90 ?

share|improve this answer
I tried running it and it produced this error: C:\Program Files\GRASS-64\etc\fortran_code>gfortran -o 2d_path 2d_path.f90 C:\Program Files\gfortran\bin/ld.exe: cannot open output file 2d_path.exe: Permi ssion denied collect2: ld returned 1 exit status – teamAngat Mar 5 '11 at 2:13
Do you have permission to write in that directory? – iant Mar 5 '11 at 18:08
Thanks. I had already resolved it by placing it first in a public directory so that I can compile it. – teamAngat Mar 6 '11 at 12:35

Helpful Link

Compilers for Windows:

share|improve this answer
Thanks. I downloaded the compiler there – teamAngat Mar 6 '11 at 15:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.