TOPIC This article describes how to link an OPENSTEP Enterprise 4.2 application against a third-party C library; in this case, the Lightweight Directory Access Protocol (LDAP) library from Netscape. DISCUSSION
On Windows NT, shared libraries are stored as dynamically loaded libraries (.DLL) files. To link against a third-party DLL, you also need the associated .LIB file. The .LIB file contains the actual entry point relocations into the DLL. Compiling and linking requires only the header (.h) and .LIB files. At run time, install the .DLL in a directory that appears in your system's PATH environment variable. The necessary third party files to link against the LDAP library can be downloaded from Netscape at http://devedge.netscape.com/one/directory/ . For this example we downloaded dk11e32.exe, which is a self-extracting file. The LDAP files were installed in the following locations: Below is source code from a simple test app. This application will display its version number (110) in a text field when a button is pressed. Note that for this simple test case, no attempt was made to configure an LDAP Directory server.
//============ AppControl.m ======================================
|
Document Information | |
Product Area: | Apple Software |
Category: | OPENSTEP |
Sub Category: | Development |
Keywords: |
Copyright © 2000 Apple Computer, Inc. All rights reserved.