MS-DOS does not provide wildcard expansion of command-line arguments to programs. Therefore, some compilers provide for wildcard expansion by linking extra code into the functions that process command line arguments. For example, Microsoft C provides such code in a file named setargv.obj.To provide expansion of wildcards from the command line, you must link setargv.obj with arch.obj. main calls a routine called _setargv to process command line arguments. setargv's default action is to not expand wildcards. By linking with setargv.obj, you replace the usual _setargv with one that expands wildcards. _setargv. obj is located in the MSC LIB subdirectory. To link in _setargv.obj from the command line use something like
cl arch.c setargv /link /NOEYou must use the /NOE link option, otherwise you get a "symbol multiply defined" error. /NOE instructs the linker not to search extended dictionaries, which are lists of symbol locations that speed up searching for references. A makefile for Microsoft's NMAKE.EXE utility is provided in Listing 4.Borland C++ includes a similar file called wildargs.obj. Zortech's version is called _MAINx.OBJ, where the x refers to the model.