Hello,
In Common Lisp, packages are a way to organize
names of function in independent namespaces, to
avoid collisions between names in different libraries.
The COMMON-LISP package contains the functions
defined in standard CL. To use them directly in
the KM package, you have to tell the KM package
should inherit the exported symbols of the COMMON-LISP package.
A common way to handle the packages is to have a
separate file packages.lisp (to be loaded first)
where you put all your packages definitions. For example:
(defpackage :km
(:use :common-lisp))
This packages.lisp file must be loaded before the other files.
This way, it is enough to put an (in-package :km)
form in the beginning of each file of the KM program.
More about packages:
http://www.gigamonkeys.com/book/programming-in-the-large-packages-and...
http://cl-cookbook.sourceforge.net/packages.html
Francis
Le 10/05/2007 20:33, Pete écrivait :
>Thanks, Nate, your tweak seems to work fine. It'll be in the next
>release (2.0.56). Best wishes! Pete
>On May 4, 11:47 am, Nate Blaylock <blaylock.n...@gmail.com> wrote:
> > I had trouble loading the packaged version of KM (2.0.53) with SBCL on
> > an Intel Mac. For some reason, SBCL needed a :use '(:common-lisp)
> > argument when doing (make-package :km) --- otherwise, it didn't seem
> > to be able to see any of the :common-lisp symbols (the first error it
> > threw was not being able to find KM::DEFVAR).
> > Pete, if you think this is worth patching, it looks like there are 3
> > places which have (make-package :km) (2 are in the cut-and-paste
> > scripts for dividing up the source files). Switching these to (make-
> > package :km :use '(:common-lisp)) worked for me.
> > nate