[plt-scheme] Loading extensions

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jul 11 11:03:54 EDT 2002

At Thu, 11 Jul 2002 07:11:26 -0700 (PDT), Noel Welsh wrote:
> I have C code called, e.g, prim-dsql, which I wrap in
> a module dsql.  dsql does the type checking etc.
> 
> I can do a (load-extension "prim-dsql.so") at a
> DrScheme prompt and then a (require prim-dsql) and I
> can access the primitives.  However I can't seem to do
> this in a module.  I declared a module called init.ss
> thats only function is to load the extension.  However
> requiring that module doesn't make the prims available
> to other modules are module
> expansion/compiling/checking/whatever type.
> 
> I.e.
> 
> (module dsql mzscheme
> 
>    (require "init.ss" dsql)
> ...)
> 
> doesn't work.

You need to arrange for `(require <some-file-path>)' to load your
extension. See

 http://www.cs.utah.edu/plt/mailarch/plt-scheme-2002/msg01031.html

for information on how to make that work. 

IMPORTANT: `(require (lib "mzrl.so" "readline"))' in the message cited
above is supposed to be `(require (lib "mzrl.ss" "readline"))'.
                                             ^^

Matthew




Posted on the users mailing list.