Please bear with me as I am a beginner with sbcl and lisp environments in general. I am using SBCL 1.0.39 compiled on Mac OSX from macports. The primary packages I am interested in using with SBCL right now are asdf, slime, cl-opengl (and cl-glu, cl-glut which come with it and cffi (for building wrappers on "c" code functions).
All seems to be working. I have written some test code as well as loaded a few example files from cl-opengl file and things seem to work - although I am wondering if I have asdf and my package collection properly installed.
When I execute function from the sbcl prompt: (compile-file "intro.lisp"), I get
; compiling file "/Users/kevinsmith/intro.lisp" (written 29 JUN 2010 04:58:26 PM):
; compiling (REQUIRE :ASDF)
; compiling (REQUIRE (QUOTE CL-OPENGL))
; compiling (REQUIRE (QUOTE CL-GLU))
; compiling (REQUIRE (QUOTE CL-GLUT));
; compilation unit aborted
; caught 1 fatal ERROR condition
; compilation aborted because of fatal error:
; SB-INT:SIMPLE-READER-PACKAGE-ERROR at 231 (line 6, column 32) on #<SB-SYS:FD-STREAM
; for "file /Users/kevinsmith/intro.lisp"
; package "GLUT" not found
; compilation aborted after 0:00:00.005
an excerpt of the source file looks like this:
(require :asdf) ; need ASDF to load other things
(require 'cl-opengl) ; load OpenGL bindings
(require 'cl-glu) ; load GLU bindings
(require 'cl-glut) ; load GLUT bindings
(defclass my-window (glut:window)
(:default-initargs :width 400 :height 300
:title "My Window Title"
:x 100 :y 100
:mode '(:double :rgb :depth)))
so, the "glut" package is not found during compilation, HOWEVER, the file will load and run properly with (load "intro.lisp") and if I then compile it, it will compile without error. Also, if I manually type in the "require" statements first and feed them to the interpreter and then try a compile-file, it also works. (alternatively, in slime, I select the require statements and then do a "evaluate region").
What am I doing wrong here ? would think that the require statements would force the compiler to get everything it needs without having to evaluate it first before compiling. A workaround for me is that I can put these requirements in my .sbclrc file, I suppose.
What are my options for the sbcl shell/evaluation loop ? With no arrow keys for history and the annoying way it handles errors, requiring you to type in a different number to go back to the previous state, it makes it a bit rough for me. Running everything through emacs seems to be the only alternative, but a nicer shell (similar to haskell shell or others) would be nice if available. (or maybe something like the inspector window in other lisps I've seen).
Thanks in Advance