2

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)

1
  • +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
1

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

3
  • 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? – Ian Turton 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
0

Helpful Link http://gcc.gnu.org/wiki/GFortran

Compilers for Windows: http://gcc.gnu.org/wiki/GFortranBinaries#Windows

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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