A static library contains one or more object modules. After you have built a library you can extract from it, to get a copy of the module in a object file.
To extract a module from an existing library, follow these steps:
For example, the following command extracts the module sample.obj from the library mylib.lib.
ilib mylib.lib /extract:sample
The module is not deleted from the library. A copy of it is put in the current working directory or in the directory specified by an absolute path specified with the file name. If an object file with the same name already exists in the directory, ilib overwrites it.
You can perform several tasks in one run of ilib. For example the following command adds the module cats.obj to the library pets.lib. At the same time it copies the module dogs from the library to the current directory and deletes the module birds from the library.
ilib /out:pets.lib cats.obj /extract:dogs /remove:birds
![]()
Static and Dynamic
Link Libraries
Maintaining Libraries
![]()
List the Contents of a Static Library
Combine Static Libraries
Add an Object Module to a Static Library
Replace an Object Module in a Static
Library
Remove an Object Module from a Static
Library
