Author Topic: Cannot find the compiler  (Read 283564 times)

Offline Lyta

  • Single posting newcomer
  • *
  • Posts: 2
Cannot find the compiler
« on: February 14, 2026, 05:44:25 pm »
I've installed this compiler : https://www.equation.com/servlet/equation.cmd?fa=fortran 15.2.0
When i type in gfortran -- version in a cmd prompt it says:
GNU Fortran (GCC) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

But when i select the GNU fortran compiler in CodeBlocks it gives this message when i try to build and run:
The compiler's setup (GNU Fortran Compiler)  is invalid, so Code::Blocks cannot find/run the compiler.
  Probably the toolchain path within the compiler options is not setup correctly?!
  Do you have a compiler installed?

What compiler do i actually have installed? I dont understand the difference between the mingw compiler and the one i actually have? Under the toolchain paths it shows for the mingw executables, but i don't think it's the one i actually have, i installed the compiler i linked earlier before codeblocks.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1859
Re: Cannot find the compiler
« Reply #1 on: February 14, 2026, 08:56:50 pm »
Go to Settings -> Compiler, select the "Toolchain executables" tab and fill the controls with your compiler's location (use where gcc.exe in the cmd prompt) and program's names.

Offline thereforerepair

  • Single posting newcomer
  • *
  • Posts: 1
Re: Cannot find the compiler
« Reply #2 on: Yesterday at 10:17:41 am »
Go to Settings -> Compiler, select the "Toolchain executables" tab and fill the controls with your compiler's location (use where gcc.exe in the cmd prompt) and program's names.

Great! The instructions shared are accurate. Executing the correct command is crucial to ensuring the program works and runs.