All Manuals > LispWorks Foreign Language Interface User Guide and Reference Manual > 4 Advanced Uses of the FLI

NextPrevUpTopContentsIndex

4.7 Incorporating a foreign module into a LispWorks image

Embedded dynamic modules are dynamically loaded foreign modules which are embedded (that is, the data is stored inside the LispWorks image). They can then can be used at run time.

The formats supported include DLL on Windows, dylib on Mac OS X, and shared object or shared library on other platforms. See Loading foreign code for details of the types of modules supported.

You use an embedded dynamic module when you want to integrate foreign code, and that foreign code is not expected to be available on the end-user's computer. In principle this could also be achieved by supplying the foreign module as a separate file together with the Lisp image, locating it at runtime and loading it with register-module. The embedded dynamic modules mechanism simplifies this.

The main interface is get-embedded-module, which is called at load time to "intern" the module, and install-embedded-module which needs to be called at runtime to make the foreign code available. It is possible to incorporate in a fasl file by using get-embedded-module-data and setup-embedded-module instead of get-embedded-module.


LispWorks Foreign Language Interface User Guide and Reference Manual - 7 Dec 2011

NextPrevUpTopContentsIndex