HP 3000 Manuals

Migrating an Application [ HP C Programmer's Guide ] MPE/iX 5.0 Documentation


HP C Programmer's Guide

Migrating an Application 

Following are the general steps to migrate a C program from an HP-UX or
UNIX system.

   1.  Test your program on the current system so you have a copy of the
       results.

   2.  Use the tar command (see the HP-UX Reference manual) with the cv
       options to transfer the source files you want to migrate to tape.

   3.  Use the tar command with the r option to transfer any associated
       data files to tape.

   4.  Install the source files and any related data files on the HP 9000
       Series 700/800 using the tar command with the x option.

   5.  Check your makefiles for any implementation-specific options.
       Change programs depending on implementation-specific command
       options.  On HP-UX systems, these options are generally preceded
       by -W or +, and may include options to be passed to ld or cpp.
       You can optionally include the -g option to permit symbolic
       debugging.

   6.  Review the lists of "Guidelines for Portability" and "Practices to
       Avoid" in the previous chapter and check over the source code for
       system-dependent programming.  (If the source files are extensive,
       you may want to skip this step and catch errors when you run lint
       or compile.)

   7.  Search for instances of #include files and make sure that the
       files or routines included appear in the correct directory or
       library on the HP 9000 Series 700/800 computer.

   8.  Run lint, a C program checker that verifies source code and prints
       warning messages about problems with the source code style,
       efficiency, portability, and consistency.

   9.  Compile the program on the HP 9000 Series 700/800 computer using
       the cc command.  (Refer to the HP C/HP-UX Reference Manual for
       details about the cc command and options, and explanations of
       error, warning, and panic messages.)  Change the source code to
       resolve any messages you receive.

  10.  Recompile the program until you receive no messages.

  11.  Link the program.  The linker reports any symbols that cannot be
       found.

  12.  Run the program on the HP 9000 Series 700/800 computer.  Compare
       the results with those received on the original computer.



MPE/iX 5.0 Documentation