[plt-scheme] load-extension and modules?
--- dvanhorn at emba.uvm.edu wrote:
> Then tried (after reading examples/idmodule.c)...
>
> Scheme_Object *scheme_initialize(Scheme_Env *env) {
> Scheme_Env *menv;
> Scheme_Object *proc;
> menv =
>
scheme_primitive_module(scheme_intern_symbol("x-module"),
> env);
> proc = scheme_make_prim_w_arity(sch_x, "x", 1, 1);
> mscheme_add_global("x", proc, menv);
> scheme_finish_primitive_module(menv);
> return scheme_void;
> }
If the file is x.c the module must be x, not x-module
as above. Once you've made that change put x.so in
the directory given by
(build-path dir "compiled" "native"
(system-library-subpath))
Then (require "x.ss") as normal.
HTH,
Noel
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com