HP 3000 Manuals

Packaging [ COBOL/HP-UX Getting Started for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Getting Started for the Series 700 and 800

Packaging 

When your application is working you may want to make it independent of
the Toolbox system so you can distribute it for use on other
binary-compatible machines.  To do this you use the UNIX system linker,
which can be accessed from the Toolbox main menu.

Note:    You can link your program only if you have a "C"/Operating
         System Development System installed on your machine.  This
         provides the system tools that cob needs, like ld, the system
         linker.

First you use the Generator again, to produce a .o file instead of a .gnt
file.

   1.  Press F6=generate.

       The Generator menu appears as before.

   2.  Press F6=gnt/object so that the word "object" appears on the
       information line.

   3.  Press Enter.

       The program is generated, but this time an .o file is produced.

   4.  Press F8=link.

       A menu appears enabling you to specify the program to be linked
       and giving you access to various functions and options useful at
       this point.  Because you have just been working with tictac its
       name is already set there, with the extension .o assumed; and the
       default settings of the menu are what we want.  So you do not
       enter anything on this menu.

   5.  Press Enter.

       The command line that Toolbox will pass to the system linker is
       displayed, and then linking begins.  A list headed "Entry points
       defined in module:  tictac.o" is displayed, after which there may
       be a long pause before the linking finishes and you are returned
       to the Toolbox main menu.

   6.  Now exit from COBOL Toolbox to the operating system, as above.

Running the Linked Program 

7.  To run the linked program, enter:

         ./tictac

The program now runs independently of the COBOL system and you can play
the Tic-Tac-Toe game.



MPE/iX 5.0 Documentation