PreviousUsing the Object Inspector (Windows NT & OS/2) Introduction to the Class LibraryNext"

Chapter 25: Compiling and Shipping OO Applications

This chapter helps you to prepare an Object COBOL OO application for delivery to an end-user.

25.1 Overview

The processes for compiling and shipping an OO application are very similar to those described for all COBOL applications elsewhere in your Object COBOL documentation set. This chapter documents the extra points you need to know about when working with OO applications, and cross-references the chapters in other Object COBOL documentation which explain compiling, linking and shipping in more detail.

There are three main reasons for the minor differences between compiling, linking and shipping OO and non-OO Object COBOL applications:

25.2 Compiling

All Object COBOL programs are compiled using the standard Micro Focus Compiler. You can run the Compiler in any of the following ways:

You must set compiler directive MFOO to compile any program using OO syntax. This enables the OO syntax in the Compiler. Setting MFOO also automatically sets directive MF.

If you are using the CLASS-OBJECT and END CLASS-OBJECT syntax introduced in Object COBOL V4.0 you must also set Compiler directive OOCTRL(+N).

Do not set the ALIGN directive when compiling classes. This can cause unpredictable errors at run-time. All classes in the supplied Class Library are compiled with the default value of ALIGN(8).

You must also set MFOO to compile any COBOL program which uses the INVOKE verb to send messages to Object COBOL classes and objects.

25.2.1 Compiling Classes with Inherited Data

When you are compiling a class which inherits data from its superclass, you must compile the superclass first. Data is inherited through .cls and .ins files generated by the Compiler from the Object-Storage Sections in a class. These files must be available before you compile any subclass which inherits the data. See the section Data Inheritance in the chapter Class Programs for more information.

Windows and OS/2:
The Class Browser provides two functions to help you compile a set of classes in the correct order; Check All and Check Subclasses. Check All compiles all the classes in a project, starting with superclasses at the top of the inheritance tree and working down. Check Subclasses starts compiling the class currently selected in the class/program selector, and works through any subclasses in the project.


Note: If you change the Object-Storage definitions in a class, you must recompile any of its subclasses which inherit its data. Otherwise, run-time behavior is unpredictable.


25.3 Shipping

UNIX:
When shipping an application to other UNIX machines you need to purchase and install Application Server for each target UNIX machine.

Windows and OS/2 :
The remainder of this section documents the files you need to ship with an Object COBOL application on Windows or OS/2. You need to include the shared run-time system files with an OO Object COBOL application as you would with a normal Object COBOL application.

Shared run-time system files are documented in the chapters Linking and Library Management on the 16-bit COBOL System and Linking on 32-bit COBOL Systems for Windows NT and OS/2 V2 in your Object COBOL User Guide.

In addition, you need to ship the files for the OO run-time support and class libraries. The tables below show you which additional files you need to ship: with 32-bit and 16-bit OO applications, and which environment variables need to point to them on the target machine. You only need the files labeled GUI functionality if you are using the GUI classes from the Class Library.

16-bit:
These are the additional files you need to ship with 16-bit Object COBOL applications.

Component File Environment variable
Class Library class.lbr COBDIR
OO run-time support oops.lbr COBDIR
GUI functionality panels2.gnt COBDIR
GUI functionality pan2pm.dll (OS/2) LIBPATH
GUI functionality pan2win.dll (Windows) PATH

32-bit:
These are the additional files you need to ship with 32-bit Object COBOL applications.

Component File Environment variable
Class Library class.lbr COBDIR
OO run-time support oops.dll LIBPATH (OS/2)
PATH (Windows)
OO run-time support mfo.dll LIBPATH (OS/2)
PATH (Windows)
OO run-time support oops.cfg COBDIR
GUI functionality panels2.gnt COBDIR
GUI functionality pan2pm32.dll (OS/2) LIBPATH
GUI functionality pan2nt.dll (Windows) PATH
OLE Automation mfole.dll Path (Windows)


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousUsing the Object Inspector (Windows NT & OS/2) Introduction to the Class LibraryNext"