McAfee MEJCAE-AM-DA Product Guide - Page 86
Programming with the E-Business Server API, Programming on Win32, Setting the run-time library path
View all McAfee MEJCAE-AM-DA manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 86 highlights
Using the E-Business Server API Programming with the E-Business Server API Programming with the E-Business Server API The E-Business Server API is supported on Win32 and several UNIX platforms. The following sections provide information for using the API on these platforms. Programming on Win32 The E-Business Server API functions are exported from the main E-Business Server DLL, EBSEngine.dll. This file is installed in the top-level E-Business Server installation directory. The other EBSsdk DLLs are installed to \%SYSTEMROOT%\system32. The three API header files-PGPBase.h, PGPeBiz.h and PGPPFLConfig.h-are installed in a .\include directory under the E-Business Server installation directory. A .\lib directory containing the import library file EBSEngine.lib is installed at the same level as the .\include directory. Win32 applications using the API must include PGPeBiz.h and link to EBSEngine.lib. The only header file you need to include in your source is PGPeBiz.h, which in turn loads the other E-Business Server header files. Ensure that the location of the supplied header files is included in your compiler's include path. Programming on UNIX On UNIX platforms, the three API header files are installed in the directory /usr/local/ebs/include. This directory needs to be included in the header search path. The only header file you need to include in your source is PGPeBiz.h, which in turn loads the other E-Business Server header files. The shared object libraries are installed in the /usr/local/ebs/lib directory. Sample Linux gcc command lines with appropriate switches and paths are shown below: Compilation example: gcc -I/usr/local/ebs/include -c userprog.c -o userprog.o Linking example: gcc userprog.o -o userprog -L/usr/local/ebs/lib \ -lEBSEngine -lEBSsdk -lEBSsdkNetwork -1m Setting the run-time library path The way that the run-time library path is set varies between the various UNIX platforms. The only platform on which no manual configuration need be performed is Linux. The following sections discuss the steps required to ensure your programs can find the EBSsdk shared libraries at run time. Note: You may need to consult your compiler and linker user manuals for more information on using shared libraries and the run-time linker. Linux The way Linux locates run-time libraries differs from other versions of UNIX. For Linux, the E-Business Server installation script adds the /usr/local/ebs/lib path to /etc/ld.so.conf and runs ldconfig -v to update /etc/ld.so.cache. This means that no special steps are required to ensure that applications can find the EBSsdk libraries, so long as the libraries, or links to the libraries, exist in their default installation path. Solaris For Solaris, you can set your RPATH properly in your executable. For example, you might specify a "-R/usr/local/ebs/lib" option to the Solaris Linker. Alternatively, you can add /usr/local/ebs/lib to the LD_LIBRARY_PATH environment variable or put links to the EBSsdk libraries in the default run-time library directory, /usr/lib. AIX and HP-UX By default, the AIX and HP-UX linkers will imbed any -L paths into the executable, and the run-time linker will use these paths to locate required shared libraries. E-Business Server™ 8.6 Product Guide 84