I've installed gfortran through the MinGW-get installer. I'm facing issues when I call a subroutine in Fortran and try to compile. I have written a small program Hello.F and a subroutine World.F such that program Hello.F calls Subroutine World.F
When I compile Hello.f using the command gfortran Hello.F
I see an error as below,
Undefined Reference to 'World_'
collect2.exe: error: Id returned 1 exit status
Below is Hello.F,
PROGRAM HELLO
CALL WORLD
STOP
END
Below is World.F
SUBROUTINE WORLD
print *, "Hello World!"
RETURN
END
Both programs Hello.F and World.F reside in the same folder and I cd
to this folder before typing in the command gfortran hello.f
to compile the program.