www.delorie.com/gnu/docs/guile/guile_405.html   search  
Buy GNU books!

Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

36.5 Old Method for Registering C Modules.

** Auto-loading of compiled-code modules is deprecated.

Guile used to be able to automatically find and link a shared library to satisfy requests for a module. For example, the module `(foo bar)' could be implemented by placing a shared library named "foo/libbar.so" (or with a different extension) in a directory on the load path of Guile.

This has been found to be too tricky, and is no longer supported. The shared libraries are now called "extensions". You should now write a small Scheme file that calls `load-extension' to load the shared library and initialize it explicitely.

The shared libraries themselves should be installed in the usual places for shared libraries, with names like "libguile-foo-bar".

For example, place this into a file "foo/bar.scm"

(define-module (foo bar))

(load-extension "libguile-foo-bar" "foobar_init")

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003