This code can be compiled using Microsoft Visual Studio 2005 (or your favorite C compiler). The procedure for this compilation is very similar to that described in the Knowledge Base article “How to Compile a User-Defined Surface”. In this case, rather than specifying the project as a Win32 Project or a Win32 Dynamic-Link Library, you should specify it as a Win32 Console Application:

Specifying the project as a Console Application

This application will be created as an Empty project:

Specifying the project as Empty

When the code is compiled, it will generate an application file with the name provided by the user during setup. The IMA and BIM files are generated by running this application (i.e. by double-clicking on the application icon). As indicated in the code, the files will be written to the \ZEMAX\IMAFiles directory.