Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Compiling and Linking Programs

This section contains information useful for compiling and linking your C programs.


To declare the SDK routines, data structures, constant, and error codes, C programs should use the msg_server_base/include/mtasdk.h header file.

Linking Instructions for Solaris

The linking instructions that follow are for the Solaris platform:

The table that follows shows the link command used to link a C program to the SDK:

% SERVER_ROOT=msg_svr_base
% cc -o program program.c \
     -I$SERVER_ROOT/include \
     -L$SERVER_ROOT/lib \

In the example, msg_server_base is the directory path to the top-level Messaging Server directory, and program is the name of your program.

If running the program in a standalone mode, that is, not under the Job Controller, then the CONFIGROOT, INSTANCEDIR, IMTA_TAILOR, and the LD_LIBRARY_PATH environment variables must be defined. See the imsimta shell script used to launch MTA programs and utilities for details.