LIB Options

The official literature for LIB does document most command-line options. However, undocumented options do exist and some of the documented options are arguably not documented well—indeed, are documented misleadingly.

In the list below of LIB options recognised by version 7.00.9466, those that the January 2004 edition of the MSDN Library on CD does not document for LIB are highlighted yellow. Several more have at least some undocumented feature to their syntax or behaviour. A few of the highlighted options are semi-documented, e.g., by being listed in the output of the lib /? command, or by being used in some batch file or makefile that Microsoft publishes either with Visual C++ or with some software development kit, or by being formally documented but for some other of Microsoft’s C/C++ products.

The alternative documentation attempted here assumes familiarity with the general syntax of linker options. Though alternative documentation is attempted for almost every recognised LIB option, only for few is more given than just the syntax. This documentation is at best a work in progress, and what progress there is may of course cease at any time, indefinitely, for lack of support.

The options listed below are all those that LIB recognises. Anything else causes warning LNK4044.