public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* A novice really trying to run MinGW to compile FORTRAN 77
@ 2018-07-03 12:46 frank.shed via fortran
  0 siblings, 0 replies; 3+ messages in thread
From: frank.shed via fortran @ 2018-07-03 12:46 UTC (permalink / raw)
  To: fortran

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

 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A novice really trying to run MinGW to compile FORTRAN 77
  2018-07-03 20:01 Tim Zeisloft
@ 2018-07-03 23:50 ` Paul Richard Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Richard Thomas @ 2018-07-03 23:50 UTC (permalink / raw)
  To: tim; +Cc: frank.shed, fortran

Hi Frank and Tim,

I am sorry to be pedantic, but this mailing list is devoted to the
development of the gfortran compiler. For this kind of query you would
do much better to go to one of the fortran forums, such as
comp.lang.fortran. You will find many more people there who use MinGW.
Most of the gfortraners use Linux exclusively in one form or another.

That said, Tim is right. You should check for the presence of your
source file when you are in the working directory, using dir. Check
also that you are using the right case for the program name. Windows
is not usually case sensitive but MinGW and Linices are.

Cheers

Paul

On Tue, 3 Jul 2018 at 21:01, Tim Zeisloft <tim@marlettesoftware.com> wrote:
>
> > It doesn't work I get the error message --  gfortran : error :  hallo.for :
> > no such file or directory
> This is indicating that the compiler is unable to find the source file.
> Either the source file name is being misspelled or it does not exist in
> your current working directory. Use the dir command to get exact
> spelling and check for existence. Windows Explorer might hide file
> extensions, so it is better to use dir in the command prompt.
>
> Tim Z
>
>


-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A novice really trying to run MinGW to compile FORTRAN 77
@ 2018-07-03 20:01 Tim Zeisloft
  2018-07-03 23:50 ` Paul Richard Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Zeisloft @ 2018-07-03 20:01 UTC (permalink / raw)
  To: frank.shed; +Cc: fortran

> It doesn't work I get the error message --  gfortran : error :  hallo.for :
> no such file or directory
This is indicating that the compiler is unable to find the source file. 
Either the source file name is being misspelled or it does not exist in 
your current working directory. Use the dir command to get exact 
spelling and check for existence. Windows Explorer might hide file 
extensions, so it is better to use dir in the command prompt.

Tim Z


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-03 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 12:46 A novice really trying to run MinGW to compile FORTRAN 77 frank.shed via fortran
2018-07-03 20:01 Tim Zeisloft
2018-07-03 23:50 ` Paul Richard Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).