next up previous contents index
Next: Fortran example Up: Integrating a MIDAS Application Previous: MIDAS Libraries

     
Integrating a MIDAS Application

In this section we will describe how to integrate a user written application into the MIDAS environment. MIDAS application code can be written in Fortran or in C. For simplicity, we assume that the application does not interact with an image or graphics display; however, it may contain subroutine calls to the standard interfaces (ST interfaces for Fortran code, SC interfaces for C)   or table interfaces (TB for Fortran, TC for C).  

In order to create the executable module , the application code, which may consist of one or more modules has to be compiled to object module(s). Hereafter, these object module(s) must be linked with the MIDAS interface library which contains the standard interfaces (ST and SC), the table interfaces (TB and TC), ``FORTRAN to C'' interfaces and the OS interfaces. In addition to the MIDAS interface library some other libraries may be needed, possibility including a non-MIDAS library. The MIDAS interface library  as well as some other MIDAS libraries all reside in the `MIDAS library' subdirectory (see Section [*].

The OS interfaces  provide the layer between MIDAS applications and the operating system. They are used internally in the standard and table interfaces and should not be used in the normal application programs.

The MIDAS primitives, i.e. the basic building blocks of the system written by ESO software staff, are stored in MID_DISK:['MIDASHOME'.'MIDVERS'.PRIM.`utility'.SRC]
for VMS and $MIDASHOME/$MIDVERS/prim/`utility'/src for UNIX, with `utility' either GENERAL, DISPLAY, PLOT or TABLE for VMS (general, display, plot or table for Unix). Use these programs as a standard and don't hesitate to copy them. Make sure you change the name if you copy and modify any of these modules!!!!

In the next two subsections you will find examples which show how to compile and link MIDAS application programs. The first example concerns a Fortran program, the second a C program. For both applications the compile and link sequence will be given for VMS and UNIX.



 
next up previous contents index
Next: Fortran example Up: Integrating a MIDAS Application Previous: MIDAS Libraries
Send comments to web@eso.org
Last update: 1998-10-23