Next: 2.2 Linking with MIDAS Up: 2 Getting started Previous: 2 Getting started

# 2.1 Compiling with MIDAS

For applications using just the MIDAS API, no special compilation options are necessary. All MIDAS API definitions are in the file `midasdll.h` [FIXME], and the modules using MIDAS functions simply need to `#include` this file. No special macros need to be `#define`d, and the data structures are structure-packing neutral. `midasdll.h` is located in the `include/` subdirectory of the MIDAS distribution, and you may need to add that directory to your include file search path.

Under Windows NT/95, the MIDAS API functions use the `stdcall` calling convention, the same as used by the Win32 API. Under DOS, the functions use the `cdecl` calling convention, and under Linux the default calling convention used by GCC. This is done transparently to the user, however.

Delphi users can simply use the interface unit `midasdll.pas`, and access the MIDAS API functions through it. Although Delphi syntax is different from C, the function, structure and constant names are exactly the same, and all parameters are passed just like in the C versions. Therefore all information in this document and the API Reference is also valid for Delphi.