gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Gcl-devel] Various questions about GCL


From: Goffioul Michael
Subject: RE: [Gcl-devel] Various questions about GCL
Date: Thu, 30 Sep 2004 11:29:45 +0200

> > Would anyone be interested to do it? (I guess it's mainly a 
> matter of cut-n-paste from the
> > 
> > "main" function). 
> > 
> 
> I am interested, given a clear understanding of how to proceed, which
> appears, alas, notrivial.

That would be great, I could volunteer for testing (standalone
exec linked against the library as well as integrated into another
apps like Matlab). Note that it doesn't *need* to be a shared
library, a static library would probably also suit my needs of
integration into a MEX file.

> >           You're probably talking about the warning ";; 
> Warning: The package operation (IN-PACKAGE "MYPKG") was in
> >      a bad place." shown below.  This is  a long standing 
> problem and is, I believe something we mean to address
> >      during the move towards releasing version 2.7.0:
> > 
> > Yes, that's the error I get. 
> 
> (Bad) Warning only, to my understanding.

In my case, it's not a warning, it's an error:
1) without (eval-when...), compilation fails

=== test.lsp ===
(unless (find-package "MYPKG")
  (defpackage "MYPKG" (:use "COMMON-LISP")))
(in-package "MYPKG")
(export 'myfun)
(defun myfun (x) (* x x))
=== test.lsp ===

Compiling test.lsp.
; (IN-PACKAGE "MYPKG") is being compiled.
;; Warning: The package operation (IN-PACKAGE "MYPKG") was in a bad place.
Error in IN-PACKAGE [or a callee]: A package error occurred on "MYPKG": "No 
such package".

2) with (eval-when...), it used to fail on loading, but I cannot
reproduce it anymore... So now it works OK.

=== test.lsp ===
(eval-when (load compile eval)
  (unless (find-package "MYPKG")
    (defpackage "MYPKG" (:use "COMMON-LISP")))
  (in-package "MYPKG")
)
(export 'myfun)
(defun myfun (x) (* x x))
=== test.lsp ===


Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]