Try OpenEdge Now
skip to main content
Managing ABL Applications
Building OpenEdge Executables : Building executables on UNIX : Building a customized executable on UNIX
 

Building a customized executable on UNIX

This section contains instructions for building OpenEdge client or AppServer executables running under UNIX to access custom C functions. The OEBuild script is located in the oebuild/make directory under the root of your OpenEdge installation.
To build a UNIX OpenEdge client executable:
1. Open a terminal and invoke a Bourne shell (/bin/sh) on the system where OpenEdge is installed.
2. Change to user root.
3. Run the PROENV utility to set the DLC variable. For example:
>$DLC/bin/proenv
4. Optionally set and export the environment variable IMAGE to the full pathname of the executable to be generated. For example:
proenv> IMAGE=/tmp/_myprogres
proenv> export IMAGE
Note: By default, the custom client executable is named $DLC/oebuild/_progres if you are building the OpenEdge client (or WebSpeed agent) executable. It is $DLC/oebuild/_proapsv if you are building the AppServer agent executable.
5. Make sure that the environment variable PATH contains the directory to the supported compiler and linker on your system.
6. Unset all the library path variables for your operating system. The script will set these variables as required. For example, on HP-UX:
proenv> unset SHLIB_PATH
7. Make a backup copy of the original OEBuild link options script and the OpenEdge tie-in object used to access custom C functions, hlprodsp.o. There are two versions of the OEBuild link options script, depending on the OpenEdge client executable you plan to build:
*build_rx.sh — OpenEdge client (or WebSpeed® agent) executable
*build__proapsv.sh — AppServer agent executable
For example, to copy the original OpenEdge client and OpenEdge tie-in object:
proenv> cp $DLC/oebuild/make/build_rx.sh            $DLC/oebuild/make/build_rx.sh.orig
proenv> cp $DLC/oebuild/obj/hlprodsp.o $DLC/oebuild/obj/hlprodsp.o.orig
8. Edit the C source file for the OpenEdge tie-in object in order to tie in your C functions to ABL as explained in the source file comments. This file is located at the following path:
$DLC/oebuild/hlc/hlprodsp.c
9. Compile the new tie-in object. For example:
proenv> cc -c -o $DLC/oebuild/hlc/hlprodsp.o $DLC/oebuild/hlc/hlprodsp.c
10. Set and export the environment variable HLC_OBJS to contain the paths of all objects that need to be included in your new OpenEdge executable, including the OpenEdge tie-in object you built in Step 9. For example:
proenv> HLC_OBJS="/home/foo.o /home/foo1.o
$DLC/oebuild/hlc/hlprodsp.o"
proenv> export HLC_OBJS
11. Run the OEBuild script located in $DLC/oebuild/make, with no arguments. There are two versions of the OEBuild script, depending on the OpenEdge client executable you plan to build:
*build_rx.sh — OpenEdge character client (or WebSpeed® agent) executable
*build__proapsv.sh — AppServer agent executable
For example, to build a customized character client use the following command:
proenv> $DLC/oebuild/make/build_rx.sh
Note: If you do not set the IMAGE variable, as in 4, the client executable is built as $DLC/oebuild/_progres for the OpenEdge character client agent or $DLC/oebuild/_proapsv for the AppServer agent; otherwise, the executable is built as specified by $IMAGE.