ldap.h header file.
#include <ldap.h>The
ldap.h header file declares the LDAP API functions.
If your client calls any of the LDAP SSL functions, make sure to include the ldap_ssl.h header file:
#include <ldap_ssl.h>
include directory (which contains the header files that you need to include) and a lib directory (which contains the shared libraries and object that you should link to).
When compiling clients on UNIX platforms, you need to link to the LDAP API shared library. The name of the library is different for the SSL-enabled and non-SSL versions of the SDK:
libldapssl30.so on Solaris, IRIX, and AIX, and libldapssl30.sl on HP-UX. examples directory, check your Makefile for the following link flags:-L../lib -lldapssl30
libldap30.so on Solaris, IRIX, and AIX, and libldap30.sl on HP-UX. examples directory, check your Makefile for the following link flags:-L../lib -lldap30If you linked to the shared library, you need to make sure that the LDAP client can find the library. Do one of the following:
libldap30.so on Solaris) in a standard location (such as the /usr/lib directory). LD_LIBRARY_PATH environment variable. On HP-UX, you can use the SHLIB_PATH environment variable if you use the -Wl,+s+b flag when compiling and linking. On AIX, you can use the LIBPATH environment variable. -R flag to specify the path where the executable can find the library. examples directory for examples of additional flags that you may need to specify when compiling and linking your LDAP client.
_CONSOLE (if you are writing a console application) or _WINDOWS (if you are writing a standard Windows application).
Make sure to link to the LDAP API import library. The name of the library is different for the SSL-enabled and non-SSL versions of the SDK:
nsldapssl32v30.lib for Microsoft compilers. nsldap32v30.lib for Microsoft compilers. nsldap32v30bc.lib is the name of the import library for Borland compilers.
Make sure to copy the nsldap32v30.dll dynamic link library (for the non-SSL verison of the SDK) or nsldapssl32v30.dll (for the SSL-enabled version of the SDK) to a directory where your client can find it.
NOTE:
Some Netscape servers (such as the Netscape Directory Server) install a
different version of the nsldap32v30.dll in the Windows system32 directory.
Make sure that your client finds the version of the DLL that is included with the
Netscape Directory SDK for C before finding the version in the system32
directory. (For example, you can copy the SDK DLL to the same directory as
your client application.)
During run-time, your client searches for the LDAP API dynamic link library in the following locations:
windows\system. In Windows NT, this directory is typically winnt\system32.) winnt\system.) PATH environment variable. NSLDAPLib shared library.
You also need to make sure that the LDAP client can find the shared library. Do one of the following:
NSLDAPLib shared library to the folder containing your client executable file. Last Updated: 10/01/98 17:02:17