Creating Shared Library Files

Creating a shared library file involves two steps:

Both steps are done using Cob.

For example, if the file myprog.cbl contains the code you want to create as a shared library you can compile and link the program to a shared library file in one step, as follows:

cob -Zg myprog.cbl

The -Z option creates a shared library file called

The -g option produces files for use by Animator.

A shared library file is not executable itself. It must be linked into a system executable using the -l flag on the Cob command line. For example:

cob -x myapp.o -L. -lmyprog

creates a system executable myapp that loads when it is run.