PMDF Programmer's Reference Manual


Previous Next Contents Index

1.11 Compiling and Linking Programs

OpenVMS Systems

To declare the API routines, data structures, HL_ constants, PMDF item codes, and PMDF error codes, C programs should use the PMDF_COM:apidef.h header file and Pascal programs should use the environment file PMDF_EXE:apidef.pen.

Linking programs to the API is accomplished with a link command of the form


$ LINK program,PMDF_EXE:pmdfshr_link.opt/OPT
where program is the name of the object file to link.

Solaris Systems

To declare the API routines, data structures, HL_ constants, PMDF item codes, and PMDF error codes, C programs should use the /pmdf/include/apidef.h header file.

Linking a C program to the API is accomplished with a link command of the form


% cc -R/pmdf/lib/ -L/pmdf/lib/ -o program program.c \
        -lpmdf -lsocket -lintl -lnsl -lm -lldapv3
where program is the name of your program.

Note

If you are compiling your program with gcc, then the commands


% gcc -g -fPIC -c -o program.oprogram.c
% gcc -g -R/pmdf/lib/ -L/pmdf/lib/ -o program program.o \      -lpmdf -lsocket -lintl -lnsl -lm -lldapv3 \      -lpthread
should be used instead.

Windows Systems

To declare the API routines, data structures, HL_ constants, PMDF item codes, and PMDF error codes, C programs should use the C:\pmdf\include\apidef.h header file.

When linking programs to the API with the Microsoft C/C++ compiler, use the switches


-mD -D_WIN32_WINNT=0x0400 C:\pmdf\bin\libpmdf.lib 


Previous Next Contents Index