How to correct "gfortran can't find path" in VIsual studio code settings?

2.3k views Asked by At

I have recently downloaded MinGw and g77 compiler for Fortran and it is based in my root directory. I also installed visual studio code to go with it. After installing extensions (related to fortran) in the text editor, there have been pop-ups that keep appearing, saying "gfortran can't find path".

The Visual studio code is also based in root directory. I have also set environment variables to each of their paths, and edited the path in Visual Studio Code with:

  {
    "fortran.includePaths": ["/usr/local/include",
        "/usr/local"]
}
{
    "fortran.gfortranExecutable": "/usr/local/bin/g77",
} 

Please do help.

1

There are 1 answers

0
Vladimir F Героям слава On BEST ANSWER

G77 is not gfortran. Gfortran is a modern current GCC compiler, g77 is a long-obsolete abandoned compiler that used to be a part of GCC 3.

If your tools (like your IDE) require gfortran, you very likely cannot use g77 instead. It may work in some situations, but not in general. You need to install gfortran.