Hello all,
I am currently teaching an introductory course on numerical methods using Fortran (department policy). We give the students an archaic IDE (Force) which honestly I don't like. In the previous semester they learned C++ using Code::Blocks. Since it can do C/C++ and Fortran at the same time, I plan on telling them to just keep using Code::Blocks, helping them to properly configure it.
The thing is, while I was testing Code::Blocks I have encountered an issue: when I hit F9 to compile+run, I usually get the 'undefined reference to _gfortran_st_write' error. This happens because it is trying to compile a Fortran source code (saved with .f extension) using gcc instead of gfortran. I can solve this by selecting gfortran as a default compiler, but then I have the opposite problem with C/C++ source files.
Is it possible to configure Code::Blocks so that it chooses the compiler according to the source file extension, or to solve this issue in any other way? The idea is not to have to manually switch the compiler every time.
Thanks a lot!