Configuring Advanced Server for UNIX

Adapting the configuration

5.9.1 Call options for compilers and linkers

If you wish to use the communication mechanisms of Advanced Server for UNIX for devel- opment purposes, you must include the necessary declaration files required for the API function in the source texts. Similarly, the required libraries must be included when linking the object files. The following table contains the options for calling the compiler and linker:

 

Call

Meaning

 

 

 

Compiler

-I/usr/include/lmx

Advanced Server for UNIX declaration

 

 

files

Linker

-llmx

Advanced Server for UNIX library

 

-lnsl

Shared library for TLI

 

-ldl

For dynamic linking

 

-lmproc

UNIX system library

 

-lext

UNIX system library

 

-lrpcapi

Advanced Server for UNIX library

 

-lmsrpc

Advanced Server for UNIX library

 

-ltask

Advanced Server for UNIX library

 

-lsam

Advanced Server for UNIX library

 

-lasusec

Advanced Server for UNIX library

 

-lasulang

Advanced Server for UNIX library

 

-lCrun

UNIX system library

 

 

 

i

The shared libraries are also used by the Advanced Server for UNIX processes.

Example:

The source file apitest.c contains API calls (e.g.DosMakeNmPipe()). This source file is compiled and linked using the program make with the following makefile:

LIBS=-llmx -lasulang -lnsl -ldl -lmproc -lext

apitest: apitest.o

cc -o apitest.o $(LIBS)

apitest.o: apitest.c

cc -c apitest.c -I/usr/include/lmx

i

The number of Advanced Server for UNIX libraries linked to the object may vary with the API functions you are using. All possible libraries are listed in the table above.

Product Manual

U7613-J-Z815-6-76

Page 138
Image 138
Siemens V4.0 manual Call options for compilers and linkers, Call Meaning