1
votes

Lisp newbie here.

I created a function and put it into this file: compress.lisp

Now I want to load it into the Lisp interpreter that I am using, GCL-2.6.2-ANSI

Here's what I typed into the interpreter:

(load "compress.lisp")

The interpreter responds with this error:

Error in EVAL [or a callee]: Cannot open the file compress.lisp.

Fast links are on: do (use-fast-links nil) for debugging
Broken at CONDITIONS::CLCS-LOAD.  Type :H for Help.
 1 (Continue) Retry loading file "compress.lisp".
 2 (Abort) Return to top level.
dbl:>>

Is loading a file not allowed with GCL-2.6.2-ANSI? Or (more likely) I did something incorrect; if so, what?

1
can you add the file compres.lisp, maybe the only problem is the path to this file, try to write the complete path to the file - anquegi

1 Answers

7
votes

Use PROBE-FILE to check whether there actually is a file under this name in the current directory:

CL-USER 57 > (probe-file "compress.lisp") 
NIL

Use the function si:chdir in GCL to change the current directory to the directory where the file actually is or provide a correct pathname to LOAD.