Try the quickstart-fortran installer instead:
- Download the “.exe” file here: Releases · LKedward/quickstart-fortran · GitHub
- Launch the executable and follow instructions
- Open the installed shell and run gfortran
Try the quickstart-fortran installer instead:
I think you have installed gfortran but not put it in your path variable. On my computer, the gfortran binary is at c:\programs\gcc\bin\gfortran.exe
. When I open a command prompt, I issue the command
set path=c:\programs\gcc\bin;%path%
so that the Windows command prompt can find gfortran. Related discussion is here. Actually I have a batch file that adds to the path variable the directories of the tools I use, including Python and R.
That is often a sign you are on the wrong track. I have installed gfortran from equation.com myself - see Fortran, C, C++ for Windows. That gives me a Fortran compiler without the MSYS2 environment. I works simply from a DOS box (command window). Kedward’s quicksstart-fortran is a useful alternative.
Arjen, I have in my C: directory “TDM-GCC-64”. How do I set the path? What happens to the paths if wrongly set before?
I would have though tthat was part of the installation process, but you can set the path like:
set path=c:\TDM-GCC-64;%PATH%
Then you ought to be able to run the compiler.