Linking and linked file types

The Compiler can create a program as an individual, unlinked object ( .o) file. This type of file is incomplete and cannot be directly executed. To create a file that can be executed, you link the compiled program to the various system or language support routines, and, if necessary, to any called subroutines that are needed at run time.

To link the programs in your application, you use the cob command, which can produce executable files of the following types:

Intermediate code

.int files are dynamically loadable, and don't need to be linked into a system executable.

Generated code

.gnt files are dynamically loadable, and don't need to be linked into a system executable.

Callable shared object files
These files are dynamically loadable, and don't need to be linked into a system executable.
Shared library files
These are system linkable files that can be linked into executable files. They cannot be directly executed themselves.
System executable files
These files are directly executable. They are loaded by the operating system, which creates a new process in which to run them.

Any program, subprogram or support routine can be linked into these file types.

The procedural code of the linked file types is shared between multiple concurrent users. The procedural code of callable shared objects and shared libraries is also shared between multiple applications.