The problem here is that the linker doesn’t know what type of file your objects are. My best guess is that you have an error in compile options which is causing a different type of file to be created, such as “-S” to create an assembly file. Do you have an example of the compile line for “My_module_XX.o”?
The problem is the “-Mcpp” flag which just pre-processes the file using cpp but does not compile it. Remove this flag or change it to “-Mpreprocess” (though .F90 files are preprocessed by default).
Hope this helps,
% pgf90 -help -Mcpp
Just preprocess the input files
m Print makefile dependencies
md Print makefile dependencies to .d file
mm Print makefile dependencies; ignore system includes
mmd Print makefile dependencies to .d file; ignore system includes
line Insert line numbers into preprocess output
[no]comment Keep comments in preprocessed output
suffix:<suff> Suffix to use for makefile dependencies
<suff> Suffix to use for makefile dependencies
include:<file> Include file before processing source file
c89 Use the C89 language
c99 Use the C99 language