[plt-scheme] loading extension in a module

From: Ian Zimmerman (itz at buug.org)
Date: Tue Nov 30 10:11:21 EST 2004

Daniel> Ok.  If you want to use load-extension or
Daniel> load-relative-extension, then I think you will need to refer to
Daniel> imported primitives through namespace-variable-value.

Daniel> Since load-extension is evaluated at runtime and your module is
Daniel> checked for free variables at compile time, the checker doesn't
Daniel> find the bindings for your C primitives and signals an error.
Daniel> Try adding the following:

Daniel> (load-relative-extension "plt_stat.so") (define c-lstat
Daniel> (namespace-variable-value 'c-lstat))

I see now.  Thanks for the explanation.

"It's not true or not."  A reality show producer (real quote)

Posted on the users mailing list.