From: Martin Grabmüller Date: Wed, 6 Jun 2001 20:14:51 +0000 (+0000) Subject: * box-dynamic-module/box-module.scm: New file. X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/d36350e84173a38a5b6fc946c995d77fe8183c6b * box-dynamic-module/box-module.scm: New file. --- 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 + + * box-dynamic-module/box-module.scm: New file. + 2001-06-05 Martin Grabmueller * 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 -: In expression make-box: -: 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 () {