Produce a Self-Contained Callable Shared Object for non-COBOL Applications (-y[,U][,CC|,PLI])

The -y flag creates a self-contained callable shared object file from the files input to the cob command. This file can then be called by non-COBOL executables.

Input files can be any file type except .gnt files. If you use object module files (.o), they are linked in using the system linker (ld).

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.

The PLI option enables you to include PL/I run-time system support for the self-contained callable shared object produced.

The source code files are compiled into intermediate code, generated to object code (.o) files, and then linked to create a dynamically loadable self-contained callable shared object.

By default, the base-name of the resulting shared object file takes the name of the first object being linked, and has the filename extension .so. The base-name forms the main entry point, but this can be overridden using the -e flag.

The U option specifies that an error message should be issued if there are any undefined symbols.

If the -g flag is also specified, the resulting self-contained callable shared object contains debugging information so that it can be debugged with Animator.

Examples:

The following examples illustrate the types of processing available using the -y flag:

cob Command line Output files
cob -y tmp/a.cbl 
a.int, a.idy, a.o, a.so
cob -y b.cbl 
b.int, b.idy, b.o, b.so
cob -y a.int 
a.o, a.so
cob -y c.o 
c.so
cob -yg a.cbl 
a.int, a.idy, a.o, a.so
cob -y,CC cobprg.cbl cprg.C 
cobprg.int, cobprg.idy, cobprg.o, cprg.o, cobprg.so
cob -y,PLI pliprog.o 
pliprog.so