> 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.
--
Phillip Helbig Email .............. [log in to unmask]
Kapteyn Instituut Email ................. [log in to unmask]
Rijksuniversiteit Groningen Tel. ................... +31 50 363 6647
Postbus 800 Fax .................... +31 50 363 6100
NL-9700 AV Groningen Web ... http://www.astro.rug.nl/~helbig/
My opinions are not necessarily those of my employer.
<A HREF=" http://gladia.astro.rug.nl:8000/helbig/hire/hire.html ">HIRE ME!</A>
Reward: one month of salary (yours or mine---take your pick)!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|