You have also to configure a fortran compiler (anf of course use it in your project), normally gfortran for gnu distribution. Have a look in the codeblocks manual. G++ is normally used for c++ but is also able to compile fortran, but at link time, you need gfortran. See paragraph 5.2.3 in the pdf (or chm documentation file).