A shared object in C must always be compiled on Unix and Linux systems such that the respective runtime system is also linked.
More details on compiling applications on Windows systems can be found on "Compiling and linking the application (Windows systems)".
Version concept of shared objects
Shared objects can be created with or without versions.
Without versions
If you want to provide a shared object without a version, you must supply precisely one file with the shared object. When exchanging using the administration command KDCPROG, it is sufficient to specify the name of the file. Shared objects without versions can only be loaded dynamically at the start of the application.With versions
If a shared object is to be available in several versions, you must first create a directory and then copy the individual versions of the shared object into this directory. You can add as may versions as you wish. When exchanging, specify both the directory name of the shared object and the version name.On Windows systems, shared objects should always be created with versions.
Generating shared objects
Each shared object must be generated with the KDCDEF statement SHARED OBJECT (see openUTM manual “Generating Applications”). Specify the following:
The name of the shared object. If the shared object has no versions, specify the name of the file under which it is stored. If the shared object has versions, specify the name of the directory containing the versions.
On Windows systems, the name of the shared object must have the extension .
dll
.Only one version can be generated for each shared object. The version can be changed using UTM administration functions.
The file name of the respective version, if the shared object has a version (VERSION operand).
On Windows systems, it is necessary to specify the version.
The path name under which the shared object can be found (DIRECTORY operand).
On Windows systems, you should always specify the complete path because the PATH and LD_LIBRARY_PATH environment variables are not evaluated for shared objects.
Whether the shared object is to be loaded at the start of the application (LOAD-MODE=STARTUP) or with the first call (LOAD-MODE=ONCALL).
The name of the shared object must be specified in the PROGRAM statement belonging to the program unit (SHARED-OBJECT operand, see also the examples on "Examples of exchanging shared objects").