MacOS(Apple Silicon)安装配置Fortran教程

简介

本文介绍如何在MacOS系统上利用VScode编辑器安装Fortran

案例MacOS系统:Venture13.5(其他版本同理)

一、Visual Studio Code下载

如何安装VScode请见:MacOS(Apple Silicon)安装C/C++教程_Lemon__Ice的博客-CSDN博客

注意:可以把Code Runner插件也安装一下 

二、安装Gfortran

前往Releases · fxcoudert/gfortran-for-macOS · GitHub直接安装二进制文件

操作完成后,打开终端/Terminal,输入

gfortran --version
which gfortran

即可确认gfortran是否安装完成,以及gfortran的具体位置。

扫描二维码关注公众号,回复: 16853241 查看本文章

三、在VScode中安装Modern Fortran插件

四、HelloWorld

创建名为ex.f90新文件,并利用HelloWorld程序来试验能否运行fortran程序

Program main
    Implicit none
    write(*,*) "Hello World!"
    End program main

参考

安装 GFortran — Fortran Programming Language

High Performance Computing for Mac OS X(另外一种方法)

猜你喜欢

转载自blog.csdn.net/Rocket_Lee/article/details/132130643