[next] [previous] [contents]

  3.2.5 Using an Object Module Library
  In a large development effort, the object modules for sub-
  programs are often stored in an object module library. By
  using an object module library, you can make program mod-
  ules contained in the library available to other programmers.
  To link modules contained in an object module library, use
  the /INCLUDE qualifier and specify the specific modules you
  want to link. For example:
  $ LINK GARDEN, VEGGIES/INCLUDE=(EGGPLANT,TOMATO,BROCCOLI,ONION)

  This example directs the linker to link the object modules
  EGGPLANT, TOMATO, BROCCOLI, and ONION with the
  main object module GARDEN.

  Besides program modules, an object module library can also
  contain a symbol table with the names of each global sym-
  bol in the library, and the name of the module in which
  they are defined. You specify the name of the object mod-
  ule library containing symbol definitions with the /LIBRARY
  qualifier. When you use the /LIBRARY qualifier during a
  link operation, the linker searches the specified library for all
  unresolved references found in the included modules during
  compilation.

  In the following example, the linker uses the library
  RACQUETS to resolve undefined symbols in BADMINTON,
  TENNIS, and RACQUETBALL:
  $ LINK BADMINTON, TENNIS, RACQUETBALL, RACQUETS/LIBRARY

  You can define an object module library, such as LNK$LIBRARY,
  to be your default library by using the DCL command
  DEFINE. The linker searches default user libraries for
  unresolved references after it searches modules and li-
  braries specified in the LINK command. See the OpenVMS
  DCL Dictionary
for more information about the DEFINE
  command.

  For more information about object module libraries, see the
  OpenVMS Linker Utility Manual
.