[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

simple package question

Helmut Jarausch

5/14/2015 9:15:00 AM

Hi,

please explain the following error message (I have next to no experience in CL package management)

When I do
(defpackage :f2cl-lib (:use :cl))
(load "f2cl-lib")

and f2cl-lib.lisp contains
(in-package :f2cl-lib)
(eval-when
#+gcl (compile load eval)
#-gcl (:compile-toplevel :load-toplevel :execute)
(proclaim '(special *verbose*)))
.....

#+(or cmu scl sbcl)
(deftype integer4 (&optional (low #x-80000000) (high #x7fffffff))
`(integer ,low ,high))
#-(or cmu scl sbcl)
(deftype integer4 (&optional low high)
(declare (ignore low high))
'fixnum)

.....

(declare (ignorable ,offset-var ,var-name)
(type f2cl-lib:integer4 ,offset-var)
(type ,atype ,var-name))

I get the following error message here
READ error during LOAD:

The symbol "INTEGER4" is not external in the F2CL-LIB package.


What does that mean and what can I do about it?

Many thanks for a hint,
Helmut
5 Answers

rpw3

5/14/2015 10:04:00 AM

0

<jarausch@skynet.be> wrote:
+---------------
| please explain the following error message (I have next to
| no experience in CL package management)
....
| (declare (ignorable ,offset-var ,var-name)
| (type f2cl-lib:integer4 ,offset-var)
| (type ,atype ,var-name))
|
| I get the following error message here
|
| READ error during LOAD:
| The symbol "INTEGER4" is not external in the F2CL-LIB package.
|
| What does that mean and what can I do about it?
+---------------

Here's a much simpler version of your example:

> (defpackage :foo (:use :cl))

#<The FOO package, 0/9 internal, 0/2 external>
> (in-package :foo)

#<The FOO package, 0/9 internal, 0/2 external>
> 'foo::bar

BAR
> 'foo:bar

Reader error at 5857 on #<Two-Way Stream, Input = #<Synonym Stream
to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>>:
The symbol "BAR" is not external in the FOO package.
[Condition of type LISP::READER-PACKAGE-ERROR]

...[remainder trimmed]...

Is the problem obvious now? [If not, please ask us again...]


-Rob

-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <http://rpw...
San Mateo, CA 94403

Helmut Jarausch

5/14/2015 10:14:00 AM

0

On Thursday, 14 May 2015 12:10:05 UTC+2, Rob Warnock wrote:
> <jarausch@skynet.be> wrote:
> +---------------
> | please explain the following error message (I have next to
> | no experience in CL package management)
> ...
> | (declare (ignorable ,offset-var ,var-name)
> | (type f2cl-lib:integer4 ,offset-var)
> | (type ,atype ,var-name))
> |
> | I get the following error message here
> |
> | READ error during LOAD:
> | The symbol "INTEGER4" is not external in the F2CL-LIB package.
> |
> | What does that mean and what can I do about it?
> +---------------
>
> Here's a much simpler version of your example:
>
> > (defpackage :foo (:use :cl))
>
> #<The FOO package, 0/9 internal, 0/2 external>
> > (in-package :foo)
>
> #<The FOO package, 0/9 internal, 0/2 external>
> > 'foo::bar
>
> BAR
> > 'foo:bar
>
> Reader error at 5857 on #<Two-Way Stream, Input = #<Synonym Stream
> to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>>:
> The symbol "BAR" is not external in the FOO package.
> [Condition of type LISP::READER-PACKAGE-ERROR]
>
> ...[remainder trimmed]...
>
> Is the problem obvious now? [If not, please ask us again...]
>
Thanks Rob,
I think I see the issue, still I don't see how to load something like f2cl-lib.
Helmut

Pascal J. Bourguignon

5/14/2015 11:56:00 AM

0

jarausch@skynet.be writes:

> I think I see the issue, still I don't see how to load something like f2cl-lib.

Try to load first the file where the package is defined precisely.

Otherwise, add the :export clause:

(defpackage "F2CL-LIB"
(:use "COMMON-LISP")
(:export "INTEGER4"))

--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

Helmut Jarausch

5/14/2015 12:55:00 PM

0

Many thanks, Pascal
Helmut

William James

5/14/2015 1:25:00 PM

0

Rob Warnock wrote:

> > (defpackage :foo (:use :cl))
>
> #<The FOO package, 0/9 internal, 0/2 external>
> > (in-package :foo)
>
> #<The FOO package, 0/9 internal, 0/2 external>
> > 'foo::bar
>
> BAR
> > 'foo:bar
>
> Reader error at 5857 on #<Two-Way Stream, Input = #<Synonym Stream
> to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>>:
> The symbol "BAR" is not external in the FOO package.
> [Condition of type LISP::READER-PACKAGE-ERROR]

Gauche Scheme:

(use srfi-13)
(use gauche.sequence)

(string-join (permute (string-tokenize (string-upcase
"> (defpackage :foo (:use :cl))
#<The FOO package, 0/9 internal, 0/2 external>
> (in-package :foo)
#<The FOO package, 0/9 internal, 0/2 external>
> 'foo::bar
BAR
> 'foo:bar
Reader error at 5857 on #<Two-Way Stream, Input = #<Synonym Stream
to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>>:
The symbol BAR is not external in the FOO package.
[Condition of type LISP::READER-PACKAGE-ERROR]
...[remainder trimmed]...
Is the problem obvious now?")
#[\w])
'(3 69 70 72 71)))

===>
"CL IS THE OBVIOUS PROBLEM"