[plt-scheme] Loading extensions

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Thu Jul 11 10:11:26 EDT 2002

Hi all,

I'm writing some binding for the Firebird database. 
I've got all the C primitives done but I'm having
trouble figuring out how I get the code in PLT Scheme.

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.


(module dsql mzscheme

   (require "init.ss" dsql)

doesn't work.  I don't want to do an ugly
you-must-call-init-before-anything-else hack.  How can
I get the primitive loaded into a module so I can use

All help appreciated.  Pls reply directly as I'm not
getting list mail :(


Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free

Posted on the users mailing list.