[plt-scheme] Problem with compiled file dependencies

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Sat Mar 10 07:07:47 EST 2007

Hello all,

I have the following:
test/foo.scm
(module foo mzscheme
  (require "bar.scm")
  (provide foo-test)

  (define (foo-test x) (bar x)))

test/bar.scm
(module bar mzscheme

  (provide bar)

  (define (bar x)
    (* 2 x)))

Now in interactions:
> (require (lib "compile.ss"))
> (compile-file "test/foo.scm")
#<path:test/compiled/foo.zo>
> (dynamic-require "test/compiled/foo.zo" 'foo-test)
. open-input-file: cannot open input file:
"/home/pmatos/test/compiled/bar.scm" (No such file or directory;
errno=2)

I understand that bar.scm is not in the same dir as the compiled file.
I could just compile the file to the same dir as the bar.scm but I
would like to know about other solutions. Any suggestions?

Cheers,
-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Posted on the users mailing list.