Next: Automatic C Preprocessor Definitions, Previous: Dynamic Linking Support, Up: Operations [Contents][Index]
The SLIB module catalog can be extended to define other
require
-able packages by adding calls to the Scheme source file
mkimpcat.scm. Within mkimpcat.scm, the following
procedures are defined.
feature should be a symbol. object-file should be a string
naming a file containing compiled object-code. Each libn
argument should be either a string naming a library file or #f
.
If object-file exists, the add-link
procedure registers
symbol feature so that the first time require
is called
with the symbol feature as its argument, object-file and the
lib1 … are dynamically linked into the executing SCM
session.
If object-file exists, add-link
returns #t
,
otherwise it returns #f
.
For example, to install a compiled dll foo, add these lines to mkimpcat.scm:
(add-link 'foo (in-vicinity (implementation-vicinity) "foo" link:able-suffix))
alias and feature are symbols. The procedure
add-alias
registers alias as an alias for feature.
An unspecified value is returned.
add-alias
causes (require 'alias)
to behave like
(require 'feature)
.
feature is a symbol. filename is a string naming a file
containing Scheme source code. The procedure add-source
registers feature so that the first time require
is called
with the symbol feature as its argument, the file filename
will be load
ed. An unspecified value is returned.
Remember to delete the file slibcat after modifying the file mkimpcat.scm in order to force SLIB to rebuild its cache.