1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

* box-dynamic-module/box-module.scm: New file.

This commit is contained in:
Martin Grabmüller 2001-06-06 20:14:51 +00:00
parent 17fa3fcf36
commit d36350e841
4 changed files with 11 additions and 14 deletions

View file

@ -1,3 +1,7 @@
2001-06-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* box-dynamic-module/box-module.scm: New file.
2001-06-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* box-dynamic-module: New directory, implements the box type in a

View file

@ -19,7 +19,7 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
EXTRA_DIST = README box.c
EXTRA_DIST = README box.c box-module.scm
CFLAGS=`guile-config compile`
LIBS=`guile-config link`

View file

@ -22,23 +22,15 @@ module called (box-module) and can thus only be accessed after using
this module. See the following example session for usage details:
Extend your LD_LIBRARY_PATH variable (or equivalent) to include . and
.libs
.libs and make sure that your current working directory is the one
this file is contained in.
If you like this example so much that you want to have it available
for normal usage, install the dynamic libraries in the .libs directory
to the directory $(prefix)/lib
Note that after loading the extension, an explicit call to use-modules
is needed to make the exported procedures available.
to the directory $(prefix)/lib and the scheme file `box-module.scm' in
a directory in your GUILE_LOAD_PATH.
$ guile
guile> (load-extension "libbox-module" "scm_init_box")
guile> make-box
<unnamed port>: In expression make-box:
<unnamed port>: Unbound variable: make-box
ABORT: (unbound-variable)
Type "(backtrace)" to get more information or "(debug)" to enter the debugger.
guile> (use-modules (box-module))
guile> (define b (make-box))
guile> b

View file

@ -133,7 +133,8 @@ init_box_type (void * unused)
second argument. It will initialize the shared, library, but will
place the definitions in a module called (box-module), so that an
additional (use-modules (box-module)) is needed to make them
accessible. */
accessible. In this example, the Scheme file box-module.scm is
responsible for doing the load-extension call. */
void
scm_init_box ()
{