Next: 2.5 A simple module Up: 2 Getting started Previous: 2.3 Linking with MIDAS

# 2.4 Using MIDAS from the IDE

This section contains step-by-step instructions on building applications that use MIDAS Digital Audio System with the Integrated Developent Environments of popular compilers.

## 2.4.1 Using MIDAS with Visual C Developer Studio

This section contains contains simple step-by-step instructions for using MIDAS Digital Audio System with Microsoft Developer Studio.

1. Begin the project as usual. If you already have an existing project, it should need no modifications.

2. Add some simple code for testing MIDAS -- either copy the module player example below, or just add a call to MIDASstartup to the beginning of the program and `#include` `midasdll.h` at the beginning of the module.

3. Add the MIDAS include directories to the include search path: Open ``Build/Project Settings'' -dialog, choose the ``C/C++'' tab, select ``Preprocessor'' from the Category list, and add the MIDAS include directory to ``Additional include directories''. For example, if you installed MIDAS in `d:/midas`, add `d:/midas/include`.

4. Add a MIDAS library to the project. In most cases, you should use the retail import library, and thus link dynamically. Open ``Insert/Files into Project'' -dialog, and select the library file you want to use, typically `d:/midas/lib/win32/vcretail/midasdll.lib`.

Now you should be able to build the project normally. To be able to run the program, you must make sure that the MIDAS DLL is available either in the same directory with the produced executable, or in some directory in the system search path. You can simply copy the DLL from (for example) `d:/midas/lib/win32/retail` to the project directory.

## 2.4.2 Using MIDAS with Watcom C IDE

This section contains contains simple step-by-step instructions for using MIDAS Digital Audio System with Watcom C IDE.

1. Begin the project as usual. If you already have an existing project, it should need no modifications.

2. Add some simple code for testing MIDAS -- either copy the module player example below, or just add a call to MIDASstartup to the beginning of the program and `#include` `midasdll.h` at the beginning of the module.

3. Add the MIDAS include directories to the include search path: Open ``Options/C Compiler Switches'' -dialog, choose ``1. File Option Switches'' from the switches list, and add the MIDAS include directory to ``Include directories''. For example, if you installed MIDAS in `d:/midas`, add `d:/midas/include`.

4. Add a MIDAS library to the project. In most cases, you should use the retail import library, and thus link dynamically. Open ``Sources/New Source'' -dialog, and select the library file you want to use, typically `d:/midas/lib/win32/wcretail/midasdll.lib`.

Now you should be able to build the project normally. To be able to run the program, you must make sure that the MIDAS DLL is available either in the same directory with the produced executable, or in some directory in the system search path. You can simply copy the DLL from (for example) `d:/midas/lib/win32/retail` to the project directory.

Next: 2.5 A simple module Up: 2 Getting started Previous: 2.3 Linking with MIDAS