summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMartin Grabmüller <mgrabmue@cs.tu-berlin.de>2001-06-06 20:14:51 +0000
committerMartin Grabmüller <mgrabmue@cs.tu-berlin.de>2001-06-06 20:14:51 +0000
commitd36350e84173a38a5b6fc946c995d77fe8183c6b (patch)
treeed46b51c717f4259512d845df35be3f61ede7b17 /examples
parent17fa3fcf36f0869e1d165ddb3d05ed233be6cdff (diff)
downloadguile-d36350e84173a38a5b6fc946c995d77fe8183c6b.tar.gz
* box-dynamic-module/box-module.scm: New file.
Diffstat (limited to 'examples')
-rw-r--r--examples/ChangeLog4
-rw-r--r--examples/box-dynamic-module/Makefile.am2
-rw-r--r--examples/box-dynamic-module/README16
-rw-r--r--examples/box-dynamic-module/box.c3
4 files changed, 11 insertions, 14 deletions
diff --git a/examples/ChangeLog b/examples/ChangeLog
index da7797723..fda148a24 100644
--- a/examples/ChangeLog
+++ b/examples/ChangeLog
@@ -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
diff --git a/examples/box-dynamic-module/Makefile.am b/examples/box-dynamic-module/Makefile.am
index 16465c814..ca157f2bc 100644
--- a/examples/box-dynamic-module/Makefile.am
+++ b/examples/box-dynamic-module/Makefile.am
@@ -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`
diff --git a/examples/box-dynamic-module/README b/examples/box-dynamic-module/README
index a3cb32496..6e4636fa3 100644
--- a/examples/box-dynamic-module/README
+++ b/examples/box-dynamic-module/README
@@ -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
diff --git a/examples/box-dynamic-module/box.c b/examples/box-dynamic-module/box.c
index 166610248..fa9eaff41 100644
--- a/examples/box-dynamic-module/box.c
+++ b/examples/box-dynamic-module/box.c
@@ -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 ()
{