[plt-scheme] Requiring absolute path

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Mon Jun 15 11:46:56 EDT 2009

Hi all,

I have a scm file which is a library to another file and once this
library is installed it resides in the system and I know its absolute
The client only knows its absolute path. Obviously the relative path
to it depends of where the client is, so I tried:
(require (path->string (find-relative-path (current-directory)
path->string: not a require sub-form in: (path->string
(find-relative-path (current-directory)

but it doesn't work. Nor this [and I understand that both cases don't work!]:
(define src (path->string (find-relative-path (current-directory)
(require src)
 src: standard-module-name-resolver: collection not found: "src" in
any of: (#<path:/home/pmatos/.plt-scheme/4.2/collects>
#<path:/home/pmatos/Applications/plt/plt-4.2/lib/plt/collects>) in:

So, I though, maybe with dynamic require I can require it by using a
relative path known at run time or an absolute path known at
compile-time. But I have no idea on how to use dynamic-require to get
all the exports of the module... because I don't really understand
what's the difference of providing a #<void> or #f as second argument
to dynamic-require.

Any suggestions?


Paulo Jorge Matos - pocmatos at gmail.com

Posted on the users mailing list.