I am trying to compile fortran 90 code using gfortran compiler in vscode in macOS Catalina. When I use the command, gfortran -o ./main Hello.f90, in vscode terminal, it works. However, if I try to add task.json and try to 'Run Task’ it throws an error. gfortran: fatal error: cannot execute 'f951': execvp: No such file or directory compilation terminated. I have tried several things including one with find/usr/local/ -name f951 in this link gfortran: error trying to exec 'f951': execvp: No such file or directory, but no luck. Please help.
My task.json
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "build", "type": "shell", "command": "gfortran", "args": [ "-o", "./main", "Hello.f90" ], "group": { "kind": "build", "isDefault": true } } ] }