Next: 2.3 Linking with MIDAS Up: 2 Getting started Previous: 2.1 Installing MIDAS

# 2.2 Compiling with MIDAS

For applications using just the MIDAS Digital Audio System API, no special compilation options are necessary. All MIDAS API definitions are in the file `midasdll.h`, 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.

MS-DOS users with Watcom C will need to disable the ``SS==DS'' assumption from the modules that contain MIDAS callback functions. This can be done with the ```-zu`'' command line option. Note that this is not necessary for code that just calls MIDAS functions.