A lot of people are confused on this topic, and a lot has been said in this forum, for which I am grateful. Just when I think I understand it (sufficiently to get by), I run into examples that conflict with what I thought I knew. So I must rehash it again.
If a library project has subroutines SubA.f90, SubB.f90, ... and modules ModA.f90, ModB.f90, ... and these are all compiled into a file MyLib.lib, that file will contain object files SubA.obj, ..., ModA.obj, .... The build procedure will also create compiled module object files ModA.mod, ModB.mod, .... that are not contained in MyLib.lib. For these routines to be used by outsiders, I must distribute MyLib.lib and all of the .mod files, and provide instructions to make .lib accessible to their linker and the .mod accessible to their compiler. There are several ways to do this. It can get unwieldy and confusing. In spades sometimes, e.g. if you need to deal with debug and release combinations.
Now I come upon some discussion, and some direct experience, of cases that defy this understanding. I will try to guess some situations that may behave so.
Q1. Suppose the library contains a subroutine SubX that USEs a module ModX. If a client's outside program has a CALL SubX, is it correct to assume this gives his program access to all of the variables and procedures in ModX? This would seem logical, at least regarding the statements in SubX, because all of the compiler needs have already been performed in the creation of SubX.obj. But how about statements in the remainder of the program? What about procedures other than the one that calls ModX?
Q2. Now consider a slightly different case: the library has a module ModY that CONTAINS a module procedure SubY. If a client program makes a call to SubY, will that also suffice? (I think not, since the program must first USE the module to gain access to the subroutine.)
Q3. Finally, suppose a library has a module ModZ and a simple subroutine called GetModZ that consists of the single line USE ModZ. Then if a client's program has the line CALL GetModZ () wherever it would normally have USE ModZ, would this provide the module access? Could this be a simpler way than distributing the .mod file to a client and providing a method for his compiler to access it? (I'm not seriously considering this, just trying to understand how things work--and it might be worth tinkering with.)