The following example shows how to use the FLI to call a C function. The function to interface with,
FahrenheitToCelsius
, takes one integer as its argument (the temperature in Fahrenheit) and returns the result as a single float (the temperature in Celsius).
The example consists of three stages: defining a foreign language interface to the C function, loading the foreign code into the Lisp image, and calling the C function to obtain the results.
LispWorks Foreign Language Interface User Guide and Reference Manual - 7 Dec 2011