Before you can build Essbase API programs you must set a few configuration options in your design environment. This discussion focuses on Microsoft Visual C++ version 6 and Visual Basic version 6. The configuration settings within a specific development environment are set in different ways, but here are a couple of hints to assist in building an API program:
Use byte-alignment for all API program structures. Note that byte-alignment is NOT the default setting for most C compilers!
Alternately, if you need to link your code with code that uses another alignment setting (for example when you are using another external API), use the following #pragma directive (only when compiling with the Microsoft C/C++ compiler):
#pragma pack(push,localid,1) #include <essapi.h> #pragma pack(pop,localid)
Always compile using the large memory model (for X86 platforms).
Include the header file essapi.h in all program files that use the API, and the header file essotl.h in all files that use the outline API.
Include the appropriate link library in your link process. Add the following library to your project: ESSAPIN.LIB for Windows. Add the Outline API library if your program uses the Outline API (ESSOTLN.LIB for Windows). For more information on the Essbase API libraries, refer to API Libraries.