7 The MLWorks Foreign Interface Library

7.2 Overview of the FI

This section provides an overview of using the FI, explaining how C code can be interfaced to ML code. There is a small example given to show some of the key features of the FI. The code for the example is found in the MLWorks installation subdirectory foreign/samples/. The example files are:

hello.c
Example C file

hello.sml
Example ML file containing FI calls for interfacing to hello.c.

Makefile
A suitable makefile for your platform.

In addition, libml.h, a C header file, which must be included in any C programs which needs to access ML data or call ML functions, is available under the bin subdirectory of the top-level MLWorks installation directory.

7.2.1 - Loading the FI into MLWorks
7.2.2 - On the C side ...
7.2.3 - On the ML side...
7.2.4 - Summary

MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker