The ilib Command (OS/2, Windows)

The library manager utility, ilib, is a command line program that you can use to update static libraries without performing a VisualAge C++ build.

You can also use ilib to create the following kinds of files:

The ability to create the files listed above is provided for compatibility with earlier versions of VisualAge C++ and predecessor products. You should not need to use such files except perhaps as an aid when you are migrating DLLs created with these earlier versions.

You can enter the ilib command from the VisualAge C++ command line window.

The ilib command takes a number of parameters, which you can specify in any of the following ways:

Start ilib from the command line by entering a command with the following form:

The ilib command has the following parameters:

option
You can set a number of ilib command options to control the behavior of ilib.

If you use more than one option, you can specify them in any order and any number of times. The only exception is that you can specify option /FREEFORMAT or /NOFREEFORMAT only immediately after the ilib command name or as the first parameter in the ILIB environment variable. Specifying /FREEFORMAT option is never necessary because this option sets the default behavior of ilib, which is to accept free format input. Use /NOFREEFORMAT only if you are specifying input to ilib with the syntax required by VisualAge C++ for OS/2 3.0.

Separate options on the command line with a space or tab character.

library
You must supply the name of static libraries to be created or modified, as input files for ilib. Static library files must have the extension .lib. If you do not specify the extension for a library, ilib uses .lib.

Unless you specify the /NOBACKUP option, ilib makes a backup copy of a library that you are modifying. Make sure you have enough disk space for both your original library and the modified copy.

@response_file
A response file is a text file that contains the same characters that you can enter on the command line. Input from an ilib response file is treated exactly like parameters on a command line, except that new lines between parameters are interpreted as spaces. Response files are useful in the following circumstances:

If you put all the parameters in the response file, run ilib with a command like the following:

ilib @MyResponseFile

You can also split the ilib command string between the command line and a response file. The response file can have any valid file name. To use special characters in the file name, such as a space or the @ symbol, the file name must be enclosed in quotes.

object
You use ilib to add, replace, remove, and extract object modules in a static library. Specify the names of the object modules at the end of the command line. If you supply just the file name, the object module is either added to the library or used to replace an existing module in the library with the same name. Precede the file name with /remove: or /extract: to delete the module from the library or make a copy of the module, respectively.

Usage Notes
You can press CTRL+C or CTRL+BREAK at any time while running ilib to return to the operating system. Interrupting ilib before completion restores the original library from a backup, provided you do not specify the /nobackup option.

The ilib command supports long file names, if the format of your disk partition also supports long names. For example you can name a library mylibraryname.new.lib.

The ILIB Environment Variable
You can specify input to ilib in the ILIB environment variable. For example, you can use the environment variable to set your own defaults for the ilib options. When ilib starts, it parses the environment variable before the command line.

Use features of your operating system to set the ILIB environment variable, just like you set any other environment variable.



Static and Dynamic Libraries
Maintaining Static Libraries
.def and .exp Files are Obsolete


Build Static Libraries
Create Module Definition Files
Create an Import Library and Export Object
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
Extract an Object Module from a Static Library
Remove an Object Module from a Static Library
Set OS/2 Environment Variables
Set Windows Environment Variables