Can't compile with a module

Hello !

I get an error when compiling my program, and i don’t understand why. I have compiled my file linkedlist.f90 with pgfortran -c, and i have the linkedlist.mod file in the same directory as my other file ex8chap6_linked_list.f90

I have have a use statement in ex8chap6.f90 that uses linkedlist. The thing is that it compiles without any errors or warnings with ifort from visual studio(Build, or start).

I wanted to try the pgi compiler with optimizations later on, but i get this error which you can see below.

Would be happy if anyone can give me some help.
-Fort_memb


C:\Users\Fort_memb\Fort_src\ex8chap6>pgfortran ex8chap6_linked_list.f90
pgfortran9hgmNs6HrMgih.obj : error LNK2019: unresolved external symbol linkedlist_add_l_ referenced in function MAIN_
pgfortran9hgmNs6HrMgih.obj : error LNK2019: unresolved external symbol linkedlist_get_f_ referenced in function MAIN_
pgfortran9hgmNs6HrMgih.obj : error LNK2019: unresolved external symbol linkedlist_get_ referenced in function MAIN_
pgfortran9hgmNs6HrMgih.obj : error LNK2019: unresolved external symbol linkedlist_add_ referenced in function MAIN_
pgfortran9hgmNs6HrMgih.obj : error LNK2001: unresolved external symbol LINKEDLIST
ex8chap6_linked_list.exe : fatal error LNK1120: 5 unresolved externals

Hi Fort_memb,

You’ll need to include the object file for the module on the link line in order to resolve the module’s data member symbols.

pgfortran ex8chap6_linked_list.f90 linkedlist.o

Hope this helps,
Mat

It helped, thank you!

Fortr_memb