Re: newbie question about load, eval-when and packages (sbcl)
- From: Rainer Joswig <joswig@xxxxxxx>
- Date: Fri, 30 May 2008 17:13:54 +0200
In article
<b96d579c-2baf-4ba5-b28d-fe24f8a9324d@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Ram Bhamidipaty <rambham@xxxxxxxxx> wrote:
I have a small package:
lib1.lisp:
------------------
(defpackage #:lib1
(:use #:common-lisp)
(:export #:hello))
(in-package #:lib1)
(defun hello ()
"hello")
------------------
I am trying to use that package in another
lisp program - and I want to dump an executable.
user1.lisp:
------------------
(eval-when (:compile-toplevel :load-toplevel)
(load "lib1" :verbose t :print t))
(use-package "LIB1")
(defun doit ()
(hello))
(sb-ext:save-lisp-and-die "user1" :toplevel 'doit :executable t)
------------------
I am using sbcl. When do "sbcl --load user1.lisp" I get
this error:
sbcl --load user1.lisp
This is SBCL 1.0.16, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
debugger invoked on a SIMPLE-ERROR:
Error during processing of --eval option (LOAD #P"user1.lisp"):
Just a guess: it did not load lib1.lisp . Check your EVAL-WHEN statement.
Add :execute for example.
The name "LIB1" does not designate any package.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Ignore and continue with next --eval option.
1: [ABORT ] Skip rest of --eval options.
2: Skip to toplevel READ/EVAL/PRINT loop.
3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).
((LAMBDA (SB-IMPL::E)) #<SB-KERNEL:SIMPLE-PACKAGE-ERROR {A674A81}>)
0] 3
I don't understand this message.
To further confuse me - in slime I can do this:
(load "lib1" :verbose t :print t)
(use-package "LIB1")
and that works great.
Please help!
-Ram
--
http://lispm.dyndns.org/
.
- Follow-Ups:
- Re: newbie question about load, eval-when and packages (sbcl)
- From: Ram Bhamidipaty
- Re: newbie question about load, eval-when and packages (sbcl)
- References:
- newbie question about load, eval-when and packages (sbcl)
- From: Ram Bhamidipaty
- newbie question about load, eval-when and packages (sbcl)
- Prev by Date: Re: Visual Frameworks vs. Cells compared to Flow-Based Programming
- Next by Date: Re: Cells compared to Flow-Based Programming
- Previous by thread: newbie question about load, eval-when and packages (sbcl)
- Next by thread: Re: newbie question about load, eval-when and packages (sbcl)
- Index(es):
Relevant Pages
|
|