[plt-scheme] more fun requiring c extensions

From: ifconfig (ifconfignslookup at hotmail.com)
Date: Tue Mar 2 17:25:36 EST 2004

When you define a module as in:
(module x mzscheme
  'blah...)
it is defined in the top level if you run it from any language Excpet module
language (which is the language used in require). To make a long story short
you need to load it as a library using a filename (require "sdl.so") or a
library path if it's in collects (require (lib "filename" "directory")).

ifconfig
BAGOS
http://bagos.sourceforge.net


----- Original Message ----- 
From: "Bruce Hauman" <bhauman at cs.wcu.edu>
To: <plt-scheme at list.cs.brown.edu>
Sent: Wednesday, March 03, 2004 12:15 AM
Subject: [plt-scheme] more fun requiring c extensions


>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> I am having difficulty understanding this behavior
>
> In an mzscheme top level this works:
>
> (load-extension "sdl.so")
> (require sdl)
>
> Yet in a module declaration like this
>
> (module check-sdl mzscheme
>    (load-extension "sdl.so")
>    (require sdl)
>   )
>
> produces this error -
> require: unknown module: sdl
>
> I am using swig with -declaremodule
>
> Happy Texas Independence Day!
>
> Bruce
>
>
>


Posted on the users mailing list.