Files
cheatsheet-tldr/tldr/windows/lib
2026-01-09 00:22:15 +00:00

34 lines
872 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# lib
> The Microsoft Library Manager for creating and managing static libraries of object files.
> More information: <https://learn.microsoft.com/cpp/build/reference/lib-reference>.
- Create a static library from object files:
`lib /OUT :{{path o\library.lib}} {{path o ile1.obj path o ile2.obj ...}}`
- List the contents of a library:
`lib /LIST {{path o\library.lib}}`
- Add an object file to an existing library:
`lib {{path o\library.lib}} {{path o ile.obj}}`
- Remove an object file from a library:
`lib /REMOVE :{{path o ile.obj}} {{path o\library.lib}}`
- Extract an object file from a library:
`lib /EXTRACT :{{path o ile.obj}} {{path o\library.lib}}`
- Create an import library from a DLL:
`lib /DEF :{{path o\definition.def}} /OUT:{{path o\import.lib}}`