You may find it useful to create libraries of Common Object File Format (COFF) object files to organize shared components of multiple projects.
In the Microsoft visual development environment, you create and manage object libraries with a variety of dialogs. From the command line, you can use the Microsoft 32-Bit Library Manager (LIB.EXE) to manage COFF object libraries, create export files and import libraries to reference exported symbol definitions when you build Dynamic Link Libraries (DLLs), and extract library members.
You use the standard libraries, import libraries, and export files LIB creates with LINK when building a 32-bit program. (LINK is described in Using the Compiler and Linker from the Command Line and Compiler and Linker Options.) The three LIB modes -- creating standard (COFF) libraries, creating import libraries and export files, and extracting library members -- are mutually exclusive. You can use LIB in only one mode at a time.
You can use LIB to perform the following library-management tasks:
Specify the filename for the existing library and the filenames for the new objects.
Specify the library filenames. You can add objects and combine libraries in a single LIB command.
Specify the library containing the member object to be replaced and the filename for the new object (or the library that contains it). When an object that has the same name exists in more than one input file, LIB puts the last object specified in the LIB command into the output library. When you replace a library member, be sure to specify the new object or library after the library that contains the old object.
Use the /REMOVE option. LIB processes any specifications of /REMOVE after combining all input objects, regardless of command-line order.
This section describes the Microsoft 32-Bit Library Manager (LIB.EXE). The following topics are covered: