[plt-scheme] Unbound variable in module error with SWIG

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Oct 30 00:17:55 EST 2006

At Sun, 29 Oct 2006 15:48:51 -0800, SUNGMIN CHO wrote:
>  >>>>>>>>>>>>>>>>>
> Once you've made that change put x.so in
> the  directory given by
>    (build-path dir "compiled" "native"
> (system-library-subpath))
> <<<<<<<<<<<<<<<<<
> 
> But the result of mzsheme is.
> --------------------------------------------
> 
>  > (build-path dir "compiled" "native" (system-library-subpath))
> 
> reference to undefined identifier: dir

`dir' was meant above to be replaced by some specific directory that
you pick.

So, if "testit.scm" is in the directory "/home/cho/stuff", then the
specific directory you want is

 (build-path "/home/cho/stuff" "compiled" "native" (system-library-subpath))

and change "testit.scm" so it contains

 (module testit mzscheme
   (require "example.scm")
   (display (fact 3)))


Matthew



Posted on the users mailing list.