Thanks for your help Doug
> In your first post you said "each subroutine/function resides in
> seperate file (such as getname.f95)" so you will have to compile each
> of these subroutines, or list them all when compiling main_int.f95.
>
Yes they are. Compiled them with g95 -c .....\main\*.f95
> If you have all these files in C:\source\library\main, you should
> probably compile your module in that directory:
I've compiled the module in that directory as well but result same. It
seems that trying to compile with that module, compiler never
recognize the inlcuded subroutines.
On the contrary compiling with following command everything works
fine, never refering to mod file just dealing with source files
g95 c:\source\library\main\*.f95 P44.f95 -o MyP44.exe
After googling around for a while I found that "main_int.f95" is
interfaced module it contains only subroutine headers that is
subroutine's name, argument list and declaration of argument types.
AFAIU the purpose of keeping the each subroutine in seperate file is,
to addopt the alterations made to the program more conveniently. Any
changes that made to those seperate files can easily be updated in
main_int.f95 (I presume that this is benefits of smart-compiling)
The thing that I couldn't figured out is, how to get that worked with
mod file ?
It may seem that I'm dancing around the same issue even I've overcome
it, but I'm sure that one way or the other I'll face in the future so
I prefer to face it now.