Produce a Shared Library File for COBOL Applications (-Z[,CC])

The -Z flag creates a shared library file from the files input to the cob command. This file can then be linked to COBOL executables.

Input files can be any file type except .gnt files.

The CC option enables you to also link C++ objects into the library file. If C++ (.C) source files are specified, the C++ compiler is invoked to compile them to object code first.

By default, the base-name of the resulting shared library file takes the name of the first object being linked, prefixed with lib, and the filename extension is .so.

For example, the following command line links the C++ program cprg.C and the COBOL program cobprg.cbl into the resulting shared library

cob -Z,CC cobprg.cbl cprg.C