Next Prev Up Top Contents Index

6.4 Foreign Language Interface templates.

The Foreign Language Interface requires pieces of compiled code to convert foreign objects to lisp objects and backwards, and it is difficult to know in advance which pieces of code are needed. Most of these pieces are already available in the image, and most applications do not need anymore templates, so you need to deal with it only if your application gives an error of missing templates after delivery.

When a new template is required, it is compiled. In a delivered image, where the compiler has been removed, this causes an error. To solve this you need to find which templates your application uses that are not already avaliable, compile them, and load them before delivering.

To find which templates your application needs, do the following:

  1. Starts the full image with your application (without delivering).
  2. call
  3. (FLI:START-COLLECTING-TEMPLATE-INFO)
  4. exercise the application.
  5. Call
(FLI:PRINT-COLLECTED-TEMPLATE-INFO)

This prints all the templates that are dynamically generated by using your application. These have to be put into a file and compiled. FLI:PRINT-COLLECTED-TEMPLATE-INFO takes a keyword :OUTPUT-STREAM to make this easier, for example:

(with-open-file (stream "fli-templates.lisp" :direction :output)
                (FLI:PRINT-COLLECTED-TEMPLATE-INFO
                  :OUTPUT-STREAM stream
))

Once you have compiled the file containing the templates, it should be loaded as part of your application.


LispWorks Delivery User Guide - 11 Dec 2001

Next Prev Up Top Contents Index