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.cExample C file
hello.sml Example ML file containing FI calls for interfacing to hello.c.
MakefileA 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.