User forums > Using Code::Blocks

GNU Fortran compiler not found

(1/2) > >>

timetobakethedonuts:
I am new to Code::Blocks.  I did a full install of codeblocks-20.03mingw-setup.exe on my Windows 10 computer, and selected the GNU Fortran Compiler.  I have a C:\Program Files\CodeBlocks\MinGW directory from the install, but in toolchain executables, when I do autodetect after filling in this directory name it tells me the executable can not be found in the directory.

I am lost and this is pretty complicated to a newcomer.  I spent 45 minutes searching the internet unsuccessfully for how to download just the GNU Fortran compiler, thinking I could add it to this directory.  I was not confident that I found a stand alone compiler - some looked like other IDEs.

Can someone please assist?  The installer I used is advertised to include the Fortran compiler.  Thank you in advance.

*edit* I realize this a very basic problem, but tried a couple of ways of researching it and came up empty.  The nature of open source in this case is making it hard to find out even what the name of the compiler executable is that should be in the folder above.  Also, why it isn't there, and how to go about adding one.

AndrewCot:
Try the following page for Fortran support and ask in the fortran forum via the link on the page:
    https://cbfortran.sourceforge.io/

timetobakethedonuts:

--- Quote from: AndrewCot on October 04, 2021, 01:48:24 am ---Try the following page for Fortran support and ask in the fortran forum via the link on the page:
    https://cbfortran.sourceforge.io/

--- End quote ---
OK, thank you.  I had no idea there may be as better place to ask.  I assume Fortran is not widely used - at least not as widely as when I learned F77 back in the day.  I appreciate the tip.  Sourceforge was where a landed while looking for a Fortran compiler, but it looked like it may be its own IDE - but it appeared the version I downloaded should come with the Fortran compiler.  Hopefully there is an easy answer.

I see now that apparently the file it is looking for is mingw32-gfortran.exe.  It is confusing, because in the toolchain executables window, there are boxes for C and C++ compiler and they both have mingw32-gfortran.exe in them.  Also, I reinstalled, and I noticed that MinGW compiler suite installation element states that additional downloads are needed.  So maybe by design an additional download is needed for the F compiler.

gd_on:
if you have installed codeblocks-20.03mingw-setup.exe, gfortran is included in the distribution (located in MinGW\bin same place as gcc, g++ ....)

timetobakethedonuts:

--- Quote from: gd_on on October 04, 2021, 12:49:05 pm ---if you have installed codeblocks-20.03mingw-setup.exe, gfortran is included in the distribution (located in MinGW\bin same place as gcc, g++ ....)

--- End quote ---
I did find gfortran.exe in the bin directory.  This is not intuitive to me - I thought it was looking for mingw32-gfortran.exe, but the fact these are in boxes labelled C and C++ it isn't clear they are for FORTRAN at all.  I changed the entries in the C and C++ boxes from "mingw32-gfortran.exe" to "gfortran.exe" and hit autodetect - that still gave an error.  But sure enough, now I have the compiler!  Thank you for replying.

Navigation

[0] Message Index

[#] Next page

Go to full version