### ILIB Options (OS/2, Windows)

ILIB options affect the behavior of ILIB. When you run ILIB, you can specify multiple options in any order. The only exception is the /FREEFORMAT option, which has a position restriction. See /FREEFORMAT, /NOFREEFORMAT for details.

Specify options with either a leading slash (/) or dash (-), and separate options on the command line with a space or tab character.

Summary of ILIB Options

The following is a summary of ILIB options.

Syntax | Description | Default
--- | --- | ---
/? | Display help. | None
/BA[CKUP] /NOBA[CKUP] | Back up the output file (if it exists) before overwriting it. | /BA
/BR[OWSE] /NOBR[OWSE] | Include browse information in an OMF library. | /BR
/DEF:def | Specify the name of a .def file to use to get information about exported symbols and linker parameters. | None
/F[REEFORMAT] /NOF[REEFORMAT] | Use the free format command line. | /F
/GEND[EF]:filename | Generate a .def file. | None
/GENI[MPLIB]:filename | Generate an import library/export object pair. | None
/H[ELP] | Display help. | None
/L[IST]:filename | Generate a list file. | None
/NOE[XTDICTIONARY] /EXTD[ICTIONARY] | Do not generate an extended dictionary in an OMF library. | /EXTD
/O[UT]:filename | Specify the name of the output library. | None
/Q[UIET], /NOL[OGO] /LO[GO], /NOQ[UIET] | Do not display the banner on startup. | /LO
/W[ARN:msgnum,msgnum[,...]] /NOW[ARN:msgnum,msgnum[,...]] | Enable printing of warning message number msgnum. | None

Notes:

1. ILIB options are not case sensitive, so you can specify them in lower-, upper-, or mixed-case.

   You can also substitute a dash (-) for the slash (/) preceding the option. For example, -FREEFORMAT is equivalent to /FREEFORMAT.

2. You can specify options in either short or long form. For example, /F, /FR, and /FREE are equivalent to /FREEFORMAT. See the table above for the shortest acceptable form of each object.

See below for detailed information on each ILIB option.

/?

Syntax | Default
/? | None

Use /? to display a list of valid ILIB options. This option is equivalent to /HELP.

/BACKUP, /NOBACKUP

Syntax | Default
/BA[CKUP] /NOBA[CKUP] | /BACKUP

Use /BACKUP to back up the output file (if it exists) before overwriting it.

ILIB uses the base name of the library as the name of the backup library, and then appends the .bak extension. For example, if the library being modified is mylib.lib and a backup is requested, ILIB will create mylib.bak in the current directory.

/BROWSE, /NOBROWSE

Syntax | Default
/BR[OWSE] /NOBR[OWSE] | /BROWSE

Use /NOBROWSE to exclude browse information from the output library. The IBM C and C++ Compilers Browser can browse libraries and executable files that contain browse information. If you exclude browse information from the library, it cannot be browsed.

/DEF

Syntax | Default
/DEF[:filename] | None

Use /DEF to specify the name of the .def file to use to get information about exported symbols and linker parameters.

This option is not required, since ILIB will recognize .def files by their contents if they are placed with other input files on the command line (see Managing Libraries: Controlling ILIB Input).

/FREEFORMAT, /NOFREEFORMAT

Syntax | Default
/F[REEFORMAT] /NOFRE[REEFORMAT] | /FREEFORMAT

Use the /FREEFORMAT option to tell ILIB that you are using the free format command line. The free format command line allows you to specify ILIB input arguments any number of times, in any order.

Note: This option must be specified immediately following ilib on the command line, or as the first argument in the ilib environment variable. If you don't specify either /FREEFORMAT or /NOFREEFORMAT, ILIB will default to the free format command line.

/GENDEF

Syntax | Default
/GEND[EF]:filename /gd | None

Use the /GENDEF option to create a module definition (.def) file.

Example

        ilib /gd:sample.def sample.dll

The command above will create the module definition file sample.def from the DLL sample.dll.

/GENIMPLIB

Syntax | Default
/GENI[MPLIB]:filename /gi | None

Use the /GENIMPLIB option to create an import library/export object pair.

Note: On OS/2, ILIB does not create an export object.

Example

        ilib /gi sample.def

The command above will create an import library named sample.lib and an export object named sample.exp from the module definition file sample.def. However, if no exported symbols are contained, then sample.lib will not be produced.

/HELP

Syntax | Default
/H[ELP] | None

Use /HELP to display a list of valid ILIB options. This option is equivalent to /?.

/LIST

Syntax | Default
/L[IST]:filename | None

Use the /LIST option to generate a list file. If `filename` is not specified, ILIB will add the extension `.lst` to the input filename.

Example

        ilib mylib.lib /list:mylib.lst

The above command directs ILIB to place a listing of the contents of mylib.lib into the file mylib.lst. No path specification is given for mylib.lst. By default, the file created is put into the current directory.

Note: The /LISTLEVEL option is not supported in both OS/2 and Windows releases of ILIB.

/NOEXTDICTIONARY, /EXTDICTIONARY

Syntax | Default
/NOE[XTDICTIONARY] /EXTD[ICTIONARY] | /EXTDICTIONARY

Use /NOEXTDICTIONARY to disable generation of the extended dictionary.

The extended dictionary is an optional part of the library that increases linking speed. However, using an extended dictionary requires more memory. The space reserved for the extended dictionary is limited to 64K. If ILIB reports an out-of-memory error, you may want to use this option. As an alternative, you can split large libraries into smaller libraries to use in linking.

/OUT

Syntax | Default
/O[UT]:filename | None

Use the /OUT option to create or maintain an existing library. If filename is not specified, then the filename of the first input file specified on the command line will be used. ILIB will add the `.lib` extension.

Examples

        ilib /out:newlib.lib mylib.lib sample.obj

The above command will create the library newlib.lib out of the objects in mylib.lib and sample.obj.

Note: Unless newlib.lib is specified as an input file, its contents will not be included in the library.

        ilib /out newlib.lib mylib.lib

The above command will create the library newlib.lib by combining it with the library mylib.lib.

/QUIET, /NOLOGO, /LOGO, /NOQUIET

Syntax | Default
/Q[UIET], /NOL[OGO] /LO[GO], /NOQ[UIET] | /LOGO, /NOQUIET

Use the /QUIET or /NOLOGO options to suppress the ILIB copyright notice.

/WARN, /NOWARN

Syntax | Default
/W[ARN:msgnum,msgnum[,...]] /NOW[ARN:msgnum,msgnum[,...]] | None

Use the /WARN option to enable printing of the message number specified in the msgnum parameter.

ILIB Objects