Next Prev Up Top Contents Index

read-foreign-modules

Function
Package

link-load

Signature

read-foreign-modules &rest module-names => t

Arguments

module-names

A sequence of strings or pathnames.

Values

t

Description

The read-foreign-modules function reads object files of various formats into the Lisp image. Unresolved references are resolved wherever possible and the names of the foreign functions are made available to the Lisp for direct calling from the Lisp if desired. With no argument, read-foreign-modules scans the default libraries looking for definitions of referenced but undefined symbols.

The module-names argument is a sequence of items representing object files to be loaded. The items may be of type string or pathname, and will be used to look up a corresponding file in the file system. The only exception is if an item is a string beginning `` -l '' in which case the rest of the string is used to look up a library file using the format strings in the variable *default-library-name-formats* . Object files of various formats and library files can be handled by read-foreign-modules .

Example
(read-foreign-modules "/usr/users/clc/projects/head.o"
                "~clc/projects/libs.a"
              "-lW")
Notes

The read-foreign-modules function actually adds the module-names to the list of modules in the variable *default-libraries* and then tries to resolve any undefined symbols using this list. The function get-foreign-symbol may be called to explicitly force a symbol onto the undefined list or the act of defining a foreign function ( fli:define-foreign-function ) will do it implicitly.

read-foreign-modules may be called at any time during the running of a program and a particular object file may be loaded as often as is necessary.

A warning of any new unresolved references will be printed out after the reading has finished if the flag *unresolved-messages* is set to t (the default is nil). By default messages are printed out about which object modules are being loaded. This may be switched off by setting *coff-loading-verbose* to nil .

See also

get-foreign-symbol

 


LispWorks Reference Manual - 25 Jul 2003

Next Prev Up Top Contents Index