[plt-scheme] Using a C/C++ extension in a module

From: Agnes Schemelt (highflyer451 at hotmail.com)
Date: Fri Apr 4 17:10:44 EST 2003


I understand that doing (load-extension "x.dll") binds all the variables in 
that extension to the top-level environment. How do I make the same thing 
happen in a module? That is, I want to use an extension, but to confine its 
bindings only to within that module. This doesn't work.

(module mymodule mzscheme
    (load-extension "x.dll")
    (provide a b c) ; These are the variables defined in the extension
         ; Complains about a b c not being bound

I saw some older postings concerning this issue but the suggested solutions 
do not work. Can anyone provide simple examples of C code and Scheme code 
that lets me do this?

Thank you very much.

-- Agnes

MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  

Posted on the users mailing list.