[log in to unmask] wrote on 5-OCT-2000 20:06:13.34
>> I have a main program TEST and two modules A and B, shown below.
>>
>> TEST uses B, and B uses A. TEST and B are in the same directory, say P,
>>
>> I get error messages, sometimes entirely inscrutable, and sometimes
>> indicating that the compiler can't find A while it's compiling TEST.
>> Given that TEST doesn't access A directly, and doesn't access Y from B,
>> this seems a bit bizarre.
>
>I set things up as you described, compiled in the proper order (from the
>directory where the file in question is) and then linked and ran the
>program. Of course, I copied the mod file from A to the directory where
>I was compiling B, and linked B.OBJ to TEST.OBJ. (Side note: my
>compiler always produces object files, even if they are not needed.)
>
>All worked as expected. This is with the Compaq compiler on VMS.
You do not have to copy module A to where you compile B, if you just enter
/include=[dir_of_a] on the f90 command for B. You can leave this out on
compilation of B. As expected A.OBJ is not needed in the link.
Jouk
Ceterum censeo tertium millennium post Christum natum anno MMI incepturum esse
>------------------------------------------------------------------------------<
Jouk Jansen
[log in to unmask]
Technische Universiteit Delft tttttttttt uu uu ddddddd
Nationaal centrum voor HREM tttttttttt uu uu dd dd
Rotterdamseweg 137 tt uu uu dd dd
2628 AL Delft tt uu uu dd dd
Nederland tt uu uu dd dd
tel. 31-15-2781536 tt uuuuuuu ddddddd
>------------------------------------------------------------------------------<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|