LIB Task

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see LIB Task on docs.microsoft.com. Wraps the Microsoft 32-Bit Library Manager tool, lib.exe. The Library Manager creates and manages a library of Common Object File Format (COFF) object files. The Library Manager can also create export files and import libraries to reference exported definitions. For more information, see LIB Reference and Running LIB.

The following table describes the parameters of the LIB task. Most task parameters correspond to a command-line option.

ParameterDescription
AdditionalDependenciesOptional String[] parameter.

Specifies additional items to add to the command line.
AdditionalLibraryDirectoriesOptional String[] parameter.

Overrides the environment library path. Specify a directory name.

For more information, see /LIBPATH (Additional Libpath).
AdditionalOptionsOptional String parameter.

A list of lib.exe options as specified on the command line. For example, "/option1 /option2 /option#". Use this parameter to specify lib.exe options that are not represented by any other LIB task parameter.

For more information, see Running LIB.
DisplayLibraryOptional String parameter.

Displays information about the output library. Specify a file name to redirect the information to a file. Specify "CON" or nothing to redirect the information to the console.

This parameter corresponds to the /LIST option of lib.exe.
ErrorReportingOptional String parameter.

Specifies how to send internal error information to Microsoft if lib.exe fails at runtime.

Specify one of the following values, each of which corresponds to a command-line option.

- NoErrorReport - /ERRORREPORT:NONE
- PromptImmediately - /ERRORREPORT:PROMPT
- QueueForNextLogin - /ERRORREPORT:QUEUE
- SendErrorReport - /ERRORREPORT:SEND

For more information, see the /ERRORREPORT command-line option at Running LIB.
ExportNamedFunctionsOptional String[] parameter.

Specifies one or more functions to export.

This parameter corresponds to the /EXPORT: option of lib.exe.
ForceSymbolReferencesOptional String parameter.

Forces lib.exe to include a reference to the specified symbol.

This parameter corresponds to the /INCLUDE: option of lib.exe.
IgnoreAllDefaultLibrariesOptional Boolean parameter.

If true, removes all default libraries from the list of libraries that lib.exe searches when it resolves external references.

This parameter corresponds to the parameter-less form of the /NODEFAULTLIB option of lib.exe.
IgnoreSpecificDefaultLibrariesOptional String[] parameter.

Removes the specified libraries from the list of libraries that lib.exe searches when it resolves external references.

This parameter corresponds to the /NODEFAULTLIB option of lib.exe that takes a library argument.
LinkLibraryDependenciesOptional Boolean parameter.

If true, specifies that library outputs from project dependencies are automatically linked in.
LinkTimeCodeGenerationOptional Boolean parameter.

If true, specifies link-time code generation.

This parameter corresponds to the /LCTG option of lib.exe.
MinimumRequiredVersionOptional String parameter.

Specifies the minimum required version of the subsystem. Specify a comma-delimited list of decimal numbers in the range 0 through 65535.
ModuleDefinitionFileOptional String parameter.

Specifies the name of the module-definition file (.def).

This parameter corresponds to the /DEF option of lib.exe that takes a filename argument.
NameOptional String parameter.

When an import library is built, specifies the name of the DLL for which the import library is being built.

This parameter corresponds to the /NAME option of lib.exe that takes a filename argument.
OutputFileOptional String parameter.

Overrides the default name and location of the program that lib.exe creates.

This parameter corresponds to the /OUT option of lib.exe that takes a filename argument.
RemoveObjectsOptional String[] parameter.

Omits the specified object from the output library. Lib.exe creates an output library by combining all objects (whether in object files or libraries), and then deleting any objects that are specified by this option.

This parameter corresponds to the /REMOVE option of lib.exe that takes a membername argument.
SourcesRequired ITaskItem[] parameter.

Specifies a list of source files separated by spaces.
SubSystemOptional String parameter.

Specifies the environment for the executable. The choice of subsystem affects the entry point symbol or entry point function.

Specify one of the following values, each of which corresponds to a command-line option.

- Console - /SUBSYSTEM:CONSOLE
- Windows - /SUBSYSTEM:WINDOWS
- Native - /SUBSYSTEM:NATIVE
- EFI Application - /SUBSYSTEM:EFI_APPLICATION
- EFI Boot Service Driver - /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
- EFI ROM - /SUBSYSTEM:EFI_ROM
- EFI Runtime - /SUBSYSTEM:EFI_RUNTIME_DRIVER
- WindowsCE - /SUBSYSTEM:WINDOWSCEReplaceThisText
- POSIX - /SUBSYSTEM:POSIX

For more information, see /SUBSYSTEM (Specify Subsystem).
SuppressStartupBannerOptional Boolean parameter.

If true, prevents the display of the copyright and version number message when the task starts.

For more information, see the /NOLOGO option at Running LIB.
TargetMachineOptional String parameter.

Specifies the target platform for the program or DLL.

Specify one of the following values, each of which corresponds to a command-line option.

- MachineARM - /MACHINE:ARM
- MachineEBC - /MACHINE:EBC
- MachineIA64 - /MACHINE:IA64
- MachineMIPS - /MACHINE:MIPS
- MachineMIPS16 - /MACHINE:MIPS16
- MachineMIPSFPU -/MACHINE:MIPSFPU
- MachineMIPSFPU16 - /MACHINE:MIPSFPU16
- MachineSH4 - /MACHINE:SH4
- MachineTHUMB - /MACHINE:THUMB
- MachineX64 - /MACHINE:X64
- MachineX86 - /MACHINE:X86

For more information, see /MACHINE (Specify Target Platform).
TrackerLogDirectoryOptional String parameter.

Specifies the directory of the tracker log.
TreatLibWarningAsErrorsOptional Boolean parameter.

If true, causes the LIB task to not generate an output file if lib.exe generates a warning. If false, an output file is generated.

For more information, see the /WX option at Running LIB.
UseUnicodeResponseFilesOptional Boolean parameter.

If true, instructs the project system to generate UNICODE response files when the librarian is spawned. Specify true when files in the project have UNICODE paths.
VerboseOptional Boolean parameter.

If true, displays details about the progress of the session; this includes names of the .obj files being added. The information is sent to standard output and can be redirected to a file.

For more information, see the /VERBOSE option in Running LIB.

Task Reference

Show: