Scieneer Common Lisp 1.3.9 online documentation

ext:load-foreign files &rest args &key libraries env verbose reload[Function]

Load-foreign loads a list of C object files into a running Lisp. The files argument may be a single file or a list of files. The files may be specified as namestrings or as pathnames. The libraries argument should be a list of library files as would be specified to ld. They will be searched in the order given. The default is just "-lc", i.e., the C library. The env argument is the Unix environment variable definitions for the invocation of the linker - the default is the environment passed to Lisp.

If reload is true then the files and other arguments are noted in a saved lisp core and are relinked and reloaded when restarted. Since ext:load-foreign firstly calls the system linker to create a dynamic library, it is recommened that foreign code to be loaded upon the restart of a save lisp core file be pre-linked and saved in a dynamic library file and loaded using ext:load-dynamic-object.