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

Offline Lyta

  • Single posting newcomer
  • *
  • Posts: 2
Cannot find the compiler
« on: Today at 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: 1825
Re: Cannot find the compiler
« Reply #1 on: Today at 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.