GFortran - 安装测试
检查系统有无 gfortran
1 | which gfortran |
若返回 gfortran not found
,则进行下一步
安装 gfortran
1 | sudo apt-get install gfortran |
测试 gfortran
查看版本号
1 | gfortran --version |
测试脚本
1 | touch hello.f90 |
1 | program hello |
编译-链接-运行
1 | gfortran hello.f90 -o hello |
参考
Fortran 官网:https://fortran-lang.org/en/learn/os_setup/install_gfortran/