I'm a new user of fortran. After installing mingw and g95, I try to run a simple hello_world.f90:
PROGRAM hello_world
PRINT *, 'Hello World! Welcome to FORTRAN!'
END
the compiling shows:
D:\fortran_test>Fortran>g95 hello_world.f90 -o hello_world.o
'Fortran' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Then i tried following:
D:\fortran_test>g++ hello_world.f90
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Dell\AppData\Local\Temp\ccXOhIRu.o:hello_world.f90:(.text+0x3b): undefined reference to `_gfortran_st_write'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Dell\AppData\Local\Temp\ccXOhIRu.o:hello_world.f90:(.text+0x59): undefined reference to `_gfortran_transfer_character_write'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Dell\AppData\Local\Temp\ccXOhIRu.o:hello_world.f90:(.text+0x67): undefined reference to `_gfortran_st_write_done'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Dell\AppData\Local\Temp\ccXOhIRu.o:hello_world.f90:(.text+0x8a): undefined reference to `_gfortran_set_args'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\Dell\AppData\Local\Temp\ccXOhIRu.o:hello_world.f90:(.text+0x9e): undefined reference to `_gfortran_set_options'
collect2.exe: error: ld returned 1 exit status
Could anyone help me out of this! Much appreciated!