This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A novice really trying to run MinGW to compile FORTRAN 77


Hallo,

 

Can you help me please.

 

For a task I'm doing I have managed to get a software program, which is
quite old and written in Fortran 77 computer language. The program runs ok
on a Windows system provided you have a GFortran Compiler. I have downloaded
the Fortran Compiler (MinGW) and installed it on my laptop Windows 10. To
demonstrate it is installed there are a couple of simple checks to show the
software version number and separately a "help" page. Both these work ok.

I got some instructions for this from the "MinGW" website. 

 

I have also copied down a very simple Fortran program, "hallo.for", three
lines of text, and loaded them into a folder I newly opened called
"programs", this is inside the MinGW directory, which as advised, is on the
main "C" drive.

 

The program run in DOS, by the command prompt.

 

1.)    At the command prompt I type    cd C:\    then press enter  this
gives C:\ >

 

2.)    I then type        cd C:\MinGW\programs     then press enter
this gives C:\MinGW\programs >      this is the folder where my simple
"hallo" program is

 

3.)    I then type        gfortran  -ffree-form hallo.for -o hallo.exe
this is the instruction given to access the file, compile and run the simple
"hallo" program

It doesn't work I get the error message --  gfortran : error :  hallo.for :
no such file or directory

 

For line item 3.) above I also tried gfortran hallo.for -o hallo.exe    

This doesn't work I get the error message --  gfortran : error :  hallo.for
: no such file or directory

 

I have also tried   gcc  -ffree-form hallo.for -o hallo.exe  and  gcc
hallo.for -o hallo.exe

This doesn't work I get the same error message for both  --  gcc : error :
hallo.for : no such file or directory

 
gcc : fatal error : no input files

 
compilation stopped    

 

I have tried many alternative ways to do this but the instructions provided
by MinGW are wide-ranging, covering many different operating systems and
different computer languages.   

 

I really would like your help and think I am doing something very stupid and
basically wrong.

 

Regards

Frank

 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]