Previous Topic Next topic Print topic


Static-linked Run-time System and When To Use It

The static-linked run-time system is designed for standalone applications.

When an .exe or .dll file runs, it uses whichever run-time system it is linked with: either the shared or the static-linked run-time system.

With the static-linked run-time system, the run-time system support required by your program is included in the final executable file along with your program modules. This means that the program runs without support from any other files, so you do not need to ship a separate copy of the run-time system with your application.

Programs linked with the static-linked run-time system are larger than if they were linked with the shared run-time system. Each separately linked subprogram contains its own run-time system support, so duplicate code is loaded when you run them.

You might also need to use the static run-time system with a static linked .dll file. For example, if the calling program was written in another language, such as Visual Basic, you might want to static link all of the COBOL programs in one .dll file, and provide the run-time system as part of the .dll file. To do this, you would need to use the static linked run-time system.

The static-linked run-time system is provided in these versions:

Lite Minimises the run-time support that is linked to your application. This option must not be used if a program in your application:
  • Uses CBL_ALLOC_MEM to allocate shared memory
  • Invokes an executable via CBL_EXEC_RUN_UNIT
Base Includes the full run-time support. Use this version of the run-time system for a standalone application.
Full As for Base, but also includes support for dynamic linking.
Debug Enables an executable to be debugged within the IDE. This version of the run-time system can also produce a core dump and save it in a file if the application crashes with a run-time system error 114. The core-dump file can subsequently be analyzed using the debugger to determine the cause of the crash. For this reason, it is sometimes useful to deploy an application that has been linked with this version of the run-time system.
Previous Topic Next topic Print topic