Re: complete novice struggling to run the Fortran Compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am a complete novice attempting to run the MinGW Fortran Compiler. I have
downloaded and installed the software on my laptop (Windows 10). I have set
the environment variables to set up the Path as instructed.
;C\MinGW\bin;%PATH%
FYI, there is a list dedicated to just gfortran, <fortran@xxxxxxxxxxx> that is a better place to get fortran help in the future.
I have subsequently set the command point to C:\MinGW\bin then gfortran
-help, I got the full range of data and later gfortran -v and got the
software version as 6.3.0.

I have the copied the "halloworld" file from your document and tried to load
it but after an enormous number of attempts over many days I have failed.

My problem is I am not proficient in the range of computer science and my
reason for getting the compiler is to run a scientific program which was
written in Fortran 77. I have accessed the GNU Manual on the internet, but
this is too advanced for me. I feel my difficulty is a very basic mistake I
am making.

I have loaded the MinGW folder direct on my "c" drive, I have loaded my
"halloworld" piece of software in a "programs" folder which is a folder
within the MinGW folder.

I have accessed the cmd and loaded cd C:\>,    then   cd C:\MinGW\programs>
but at this point when I type gfortran hallo.for -o hallo.exe   I just get
fatal error at gfortran or error at gfortran no such file or directory.
It is good to post the actual text of the error message that occurs, as that helps to zoom in on the specific problem. With the information provided, my best guess is that you are trying to compile a free source form program as fixed source. A quick way to tell would be to change the extension of the program from "halloworld.for" to "halloworld.f90", and try compiling again. The compiler assumes that source files having the .f or .for extensions are fixed form, and extensions like .f90 are free form. Since you are working with F77 code, you will be compiling fixed source form.

Good luck & best regards,  Tim Z






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux