Sublime Forum

Build system - change path env

#1

According http://docs.sublimetext.info/en/latest/reference/build_systems/exec.html either “path” or “env” can be used to extend current PATH environment variable.

This is my build system for Fortran:

{
    "cmd": "gfortran \"${file}\" -o \"${file_path}/${file_base_name}\"",
    "path": "D:/mingw-w64/mingw64/bin",
    "env": {"path": "D:/mingw-w64/mingw64/bin"},
    "selector": "source.fortran",
}

I have gfortran.exe in “D:/mingw-w64/mingw64/bin” and when I try to build fortran file, I get:

‘gfortran’ is not recognized as an internal or external command,
operable program or batch file.

What am I doing wrong?

0 Likes

#2

The problem here was that there was another sublime build file that was using gfortran in build system - one in fortran plugin.

0 Likes