Geoff Chappell - Software Analyst
Except if a directive begins with a hyphen or forward slash, or with an @ if on the actual command line, it names one or more input files.
The way for one directive to name more than one file is with wildcards. A directive that contains a ? or * expands, in effect, to a single-file directive for each file that exists with a pathname that matches the wildcard expression as given.
Where a directive, whether as given or implied by wildcard expansion, is intended to name one input file, some provisions exist for inferring a different name from what is specified.
LINK infers “.obj” as the file extension for any input file whose name does not already have an extension. This is for LINK only, not DUMPBIN, EDITBIN or LIB. The extension is inferred even if a file exists with the name as given, i.e., without the extension. Once the extension is inferred, the name is treated as if it had this extension all along.
If the input file does not exist as given, but is given with no drive or path, it may be sought elsewhere.
The main source of paths to search is the LIB environment variable, whose value (like the well-known PATH environment variable) is expected to provide one or more paths separated with semicolons.
LINK and LIB, but not DUMPBIN or EDITBIN, first search for the file on the paths given in successive /libpath options. The order of /libpath options with respect to the input-file directive is irrelevant. LINK and LIB make a first pass through all command-line directives to find /libpath options so that they are all known, wherever they are, by the time that a second pass discovers the input-file directives.
Once an input file is found on a search path, the name is treated as if it had this path all along.