For example, in my main.scm
file I have (load "util.scm")
. util.scm
is a file in the same folder as main.scm
. Both files are located in ~/documents/myproject/
.
Now when I'm in this directory, and I run $ chez-scheme main.scm
everything works fine. However, if I'm in my home directory and run $chez-scheme documents/myproject/main.scm
it complains, not being able to find the file util.scm
. I suppose this is the case because the current directory was my relevant home directory, and as such util.scm
is indeed not there, it is actually in documents/myproject/
. That being said, I'm used (in other languages) to the functionality of looking these paths up relative to the file containing the instruction to import, and I'd like to have that here as well. I've tried prefixing it by ./
or defining the file as a libary and doing (import (util))
but none of it works outside of documents/myproject/
. Is there any way to get this to work as I intend it to?
I assume this is Chez-Scheme-specific. If not I'd prefer an answer that is implementation-neutral.