[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modules: first steps.
From: |
Martin Grabmueller |
Subject: |
Re: Modules: first steps. |
Date: |
Fri, 20 Sep 2002 16:21:14 +0200 |
> From: Han-Wen Nienhuys <address@hidden>
> Date: Thu, 19 Sep 2002 22:31:15 +0200
>
> That doesn't inspire much confidence.
>
> blauw:~/usr/src/guile-1.6.0/examples/box-module$ rm box
> blauw:~/usr/src/guile-1.6.0/examples/box-module$ rm box.o
> blauw:~/usr/src/guile-1.6.0/examples/box-module$ make box
> gcc `/home/hanwen/usr/pkg/guile-1.6//bin/guile-config compile` -c box.c
> gcc box.o `/home/hanwen/usr/pkg/guile-1.6//bin/guile-config link` -o box
> blauw:~/usr/src/guile-1.6.0/examples/box-module$ ./box
> guile> (use-modules (box))
> <unnamed port>: In expression ELF```ab`
> <unnamed port>: Unbound variable: ELF```ab`
> ABORT: (unbound-variable)
>
> Type "(backtrace)" to get more information or "(debug)" to enter the debugger.
> guile>
Let me quote the README file:
** Example Session
$ ./box
guile> (use-modules (box-module))
guile> (define b (make-box))
guile> b
#<box #f>
guile> (box-set! b '(list of values))
guile> b
#<box (list of values)>
guile> (box-ref b)
(list of values)
guile> (quit)
$
So the module is called (box-module), not (box).
Guile seems tries to load the file `box' if you try to load a module
with that name, and that file unfortunately is the executable just
started, and Guile of course does not know what to do with an ELF
header :)
'martin