franklin
franklin

Reputation: 1

How to run fortran program with gfortran on cygwin or vs code

I received a program which has many external soubroutines (in different file) and I want to run it. I use the Silverfrost compiler (Plato) but it gave me many errors, the person who sent me the program told me that is there is errors it me that I am not using good Fortran compiler and he asked me to use gfortran on a Linux system. The problem is that I am using a Windows system. So I have downloaded gcc-fortran on cygwin compiler and the problem that I had when I tried to create the object of the different soubroutines to compiler the program is :

Fatal Error: File 'fuinput.mod' opened at (1) is not a GNU Fortran module file compilation terminated.

I am also using gfortran on virtual studio code and even there I had the same fatal error

Upvotes: 0

Views: 187

Answers (1)

You must first delete all .mod module files that were generated by your previous compiler. Gfortran will generate its own a.mod files for each module.

If you still have error messages after doing that, you must show the full compiler output, not just one error line.

Upvotes: 0

Related Questions