PURPOSE

compilation - how to compile TUXEDO System/T application components

DESCRIPTION

In order to compile application clients and servers, and subroutines that are link edited with the TUXEDO System/T-supplied client, mio, programmers need to know:

--
what header files to include, and the order in which to specify them
--
what utilities are used to compile the application modules
--
what environment variables to set and export

This manual page provides this information.

TUXEDO System, In General

Header File Sequence UNIX header files should always be included before any TUXEDO System header files. Commonly used UNIX header files are stdio.h and ctype.h.

Environment Variables

In general, the following environment variables should be set and exported:

TERM --
(indicates terminal type, if a terminal is used)
 
TUXDIR --
(specifies the topmost directory where the TUXEDO System software resides)
 
PATH --
(should include $TUXDIR/bin)
 
ULOGPFX --
(prefix of the filename of the central event log; default, ULOG)

More information about these variables can be found in the BEA TUXEDO Programmer's Guide and the BEA TUXEDO Administrator's Guide

TUXEDO System/T

Header File Sequence Form files do not contain header information.

C programs that call mio functions should include the following header files, in the order listed below:


#include <UNIX header files>	(if needed by the application)
#include "fml.h"
#include "Usysflds.h"

C programs that call TUXEDO System/T functions that access the Bulletin Board should include the following header files, in the order listed below:


#include <UNIX header files>	(if needed by the application)
#include "atmi.h"

Additionally, programs that call amaskout should include the following:


#include <signal.h>
#include "Usignal.h"

Notes: If a program uses amaskout and other TUXEDO System/T functions, UNIX header file(s) should be included before including TUXEDO System/T header files.

Usignal.h, atmi.h, fml.h, and Usysflds.h may be specified in any order, as long as fml.h is specified before Usysflds.h. For example, the following are both valid:


  SAMPLE 1	  SAMPLE 2
#include <stdio.h>	#include <stdio.h>
#include "atmi.h"	#include <signal.h>
#include "fml.h"	#include "Usignal.h"
#include "Usysflds.h"	#include "atmi.h"
	#include "fml.h"
	#include "Usysflds.h"

Applications using the functions on the tpservice(3c), tpalloc(3c), tpbegin(3c), tpcall(3c), tpinit(3c), and tpopen(3c) manual pages should include the atmi.h header file.

Compilation of UFORM Masks

UFORM masks are compiled as follows:


1. Create field tables and field table header files.
2. Set and export FIELDTBLS and FLDTBLDIR.
3. Execute the command: mc filename.m where filename.m 
is the name of the file containing UFORM mask definitions.

FIELDTBLS and FLDTDIR are defined in the Environment Variables section below. If vuform(1) is used to develop UFORM masks, compilation is automatic.

To build an mio program, do the following:


1. Create the forms using UFORM or vuform(1).
2. Write and archive lastval and firstval functions (if desired).
3. Write and archive default and validation functions.
4. Build the mio program by executing:
   buildmio [-w] [-o outfile] [-v vallib] [-d dfltlib]  [-f lib] [-a genlib]
   where
   -w indicates that a workstation mio should be built,
   outfile is the name of the executable,
   vallib is the archive file of validation functions,
   and dfltlib is the archive file of default functions.
   lib is a library or object file containing externals needed
   by the validation or default functions.
   genlib is a library or object file containing both validation
   and default functions.

To build a non-mio client program, execute:


   buildclient [ -v ] [ -w ] [ -o name] [ -f firstfiles] [ -l lastfiles] [ -r rmname]
   where
   -v indicates verbose mode,
   -w indicates workstation mode,
   name is the executable file name,
   firstfiles are files to be included before system libraries, and
   lastfiles are files to be included after system libraries.
   rmname is specified as the resource manager associated with the client.

To compile a TUXEDO System/T server, execute:


   buildserver [ -o pgm] [ -s services] [ -f objectfiles] [ -r rmname]
   where
   pgm is the name of the executable file and
   services is a comma separated list of services to be offered by
   the server.
   objectfiles is a list of the objectfiles to be linked.
   If more than one file is specified, file names must be separated
   by white space and the entire list must be enclosed in double quotes.
   rmname is specified as the resource manager associated with the server.

Notes: See the buildserver(1) man page for additional information and options. The environment variable CC can be used to designate the compiler to use. CFLAGS can be used to pass parameters to the compiler. For esql programs, follow the esqlc instructions, then run buildserver.

Environment Variables

The following environment variables should be set and exported before executing mc(1) or vuform(1):

FIELDTBLS --
(comma-separated list of field table files)
FLDTBLDIR --
(colon-separated list of directories to search for the FIELDTBLS)

The following environment variables also may be set and exported before executing mio.

MASKPATH --
(full path of the directory containing the compiled masks, default is the current directory)
MASKIPCKEY --
(key to mask cache; must be specified if cache is used)

If a default or validation routine references FML fields, set: FIELDTBLS and FLDTBLDIR

To restrict access to forms, set:

OKXACTS --
(comma-separated list of forms that the user can access, default is all)
NGXACTS --
(comma-separated list of forms that the user cannot access, default is none)

Notes: OKXACTS is checked first. If the form is listed in OKXACTS (or OKXACTS is ALL), then NGXACTS is checked. If the form is listed in NGXACTS, then an error is reported. More information about running mio can be found in the BEA TUXEDO Programmer's Guide, the BEA TUXEDO Administrator's Guide, and the BEA TUXEDO Data Entry System Guide.

When the system has been built with shared libraries, the following environment variable must be set as shown before executing a client:


LD_LIBRARY_PATH=$TUXDIR/lib

The following environment variable should be set before executing a server:

TUXCONFIG --
(full pathname of the binary configuration file, default is the current directory)

The following environment variable should be set and exported before executing system supplied clients ( mio(1), tmadmin(1), ud(1)) in an application with security turned on:

APP_PW --
(application password)

The following environment variables should be set and exported before executing workstation clients:

WSENVFILE --
(file containing environment variable settings)
WSDEVICE --
(network device to use for connection)
WSTYPE --
(workstation machine type)

More information about options for servers can be found on the servopts(5) manual page.

FML Programs

Header File Sequence
C programs that call FML functions should include the following header files, in the order listed:


#include <UNIX header files>	(if needed by the application)
#include "fml.h"

Note: mio programs that use FML must also include fml.h.

Compilation of FML Programs

To compile a program that contains FML functions, execute:


cc pgm.c -I $TUXDIR/include -L $TUXDIR/lib -lfml -lgp -o pgm

where pgm is the name of the executable file.

If the -L option is not locally supported, use the following version of the command:


cc pgm.c -I $TUXDIR/include $TUXDIR/lib/libfml.a $TUXDIR/lib/libgp.a -o pgm

Notes: The order in which libraries are specified is significant. Use the order given above.

Compiling FML VIEWS

To use the FML view compiler, execute:


viewc view_file
      where
      view_file is one or more files containing source view descriptions.
      Notes:
      viewc invokes the C compiler.
      The environment variable CC can be used to designate the compiler to use.
      The environment variable CFLAGS can be used to pass a set of parameters
      to the compiler.

Environment Variables for FML

The following environment variables should be set and exported when running an application that uses FML:

FIELDTBLS --
(comma-separated list of field table files)
FLDTBLDIR --
(colon-separated list of directories to search for the FIELDTBLS)

In addition to FIELDTBLS and FLDTBLDIR, the following environment variable should be set and exported when executing viewc:

VIEWDIR --
(directory containing view files, default is current directory)

PORTABILITY

On MS-DOS and OS/2 machines, because of file naming restrictions, buildclt(1) must be used instead of buildclient(1). Differences in file naming semantics and syntax also affect the following environment variables:

FLDTBLDIR
TUXDIR
ULOGPFX
VIEWDIR

SEE ALSO

buildclient(1),
buildclt(1),
buildserver(1),
viewc(1)
cc(1) in a UNIX reference manual