Keep in mind that a C program may be spread across several files. C allows that each of these files should be compilable by itself, so the compiler does not know what it will later find in the other files. It is therefore possible that a name is used in one file even though it is created (as a variable or as a function) in a later file. The compiler has to be told that this name is valid even though the full definition hs not appeared yet. This is of course a general problem, not one peculiar to C. It is desirable to support multi-file compilation for various reasons, for example it would take too long to recompile a large program whenever a single line needs changing. Proper multi-file compilers require you only to recompile the single file containing the line of code.
The basic problem such compilers have to solve is how to `connect' a given name in one place with the associated storage created in another place. C uses the term ``linkage'' to express the idea of the connection between a given name and the storage (and type) associated with that name. It is this we now have to explore.
C distinguishes three classes of linkage:
maspjw@