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"):
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
In article
<····································@w8g2000prd.googlegroups.com>,
Ram Bhamidipaty <·······@gmail.com> 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/