Node:C Module Reg, Next:, Previous:Close All Ports, Up:Deprecated



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")