compilation - how to compile TUXEDO System/T application components
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:
This manual page provides this information.
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.
In general, the following environment variables should be set and exported:
More information about these variables can be found in the BEA TUXEDO Programmer's Guide and the BEA TUXEDO Administrator's Guide
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.
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.
The following environment variables should be set and exported before executing mc(1) or vuform(1):
The following environment variables also may be set and exported before executing mio.
If a default or validation routine references FML fields, set: FIELDTBLS and FLDTBLDIR
To restrict access to forms, set:
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:
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:
The following environment variables should be set and exported before executing workstation clients:
More information about options for servers can be found on the servopts(5) manual page.
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.
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.
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.
The following environment variables should be set and exported when running an application that uses FML:
In addition to FIELDTBLS and FLDTBLDIR, the following environment variable should be set and exported when executing viewc:
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:
buildclient(1),
buildclt(1),
buildserver(1),
viewc(1)
cc(1) in a UNIX reference manual