USE module?

Hello, I’m trying to use a module compiled with the pgf compiler. Unfortunatly I’m having some difficulties.
I’ve compiled a module called subspecies into subspecies.mod. In another f90 document I have the statement “use subspecies”. However trying to compile the code provides the error “undefined reference to subspecies_” The module file is in the same folder as the document with the use statement. What should I do? I apologise for the basic question, but I can’t seem to find an answer anywhere.

Hi Catteneo,

You’re most likely missing the object file for the module on the link line. Something like:

pgfortran -c module.f90
pgfortran -c main.f90
pgfortran -o my.out module.o main.o

Hope this helps, but if not, please post the command lines that you’re using and the full output of the error,

-Mat

That does appear to have solved the issue. Thank you very much Mat.