Once an interface has been created, the object code defining those functions (and indeed any variables) must be made available to LispWorks.
LispWorks for UNIX defines the function
link-load:read-foreign-modules
that either load object files (usually suffixed with "
.o
") directly into the Lisp image, extract any required object files from the available archive libraries (usually suffixed with "
.a
"), or load in shared libraries (usually suffixed with "
.so
"). The
read-foreign-modules
function takes a list of module names as its argument.
LispWorks for Windows can load Windows Dynamic Link Libraries (
.DLL
files). LispWorks for Linux can load shared libraries (typically
.so
files). Lispworks for Macintosh can load Mach-O dynamically-linked shared libraries (typically
.dylib
files). Throughout this manual we shall refer to these dynamic libraries as DLLs.
On Windows, Linux and Macintosh the function register-module is the LispWorks interface to DLL files. It is used to specify which DLLs are looked up when searching for foreign symbols. Here are example forms to register a connection to a DLL.
(fli:register-module
"
MYDLL.DLL
"
)
(fli:register-module
"
mylib.so
"
)
(fli:register-module
"
mylib.dylib
"
)