I copy the commands I use for compiling with mingw-w64:
cmd_obj_c: x86_64-w64-mingw32-gcc -cpp -c <srcName> -o <objName>
#
cmd_obj: x86_64-w64-mingw32-gfortran -cpp -march=native -O3 -c -fno-range-check -ffixed-line-length-132 -finit-real=nan -frecord-marker=4 <mods> <incs> <f95name>
cmd_exe: x86_64-w64-mingw32-gfortran -static -march=native -O3 -fno-range-check -ffixed-line-length-132 -finit-real=nan -frecord-marker=4 -v -o <exename> <objs> -Xlinker --start-group <libs>
Give them a try if the default dosn't work.
Costas