PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

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.

Digital UNIX 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 -Wl,-rpath,/pmdf/lib/ -L/pmdf/lib/ -o \ 
        program program.c -lpmdf -lc -ldb -lldapv3
where program is the name of your program.

Similarly, linking a Pascal program to the API is accomplished with a link command of the form

% pc -Wl,-rpath,/pmdf/lib/ -L/pmdf/lib/ -o \ 
        program program.c -lpmdf -lc -ldb -lldapv3

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 -ldb -lldapv3
where program is the name of your program.

NT 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\lib\libpmdf.lib 


Previous | Next | Contents