mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
Improve the documentation for `dynamic-link'.
* doc/ref/api-foreign.texi (Foreign Libraries): Make it clear that the LIBRARY argument of `dynamic-link' should not contain an extension. (Foreign Functions): Add cross-reference from `load-extension' to `dynamic-link'. Typeset file names and module names correctly.
This commit is contained in:
parent
bd79ebf318
commit
fba502dbcc
1 changed files with 10 additions and 3 deletions
|
@ -79,6 +79,12 @@ Normally, @var{library} is just the name of some shared library file
|
||||||
that will be searched for in the places where shared libraries usually
|
that will be searched for in the places where shared libraries usually
|
||||||
reside, such as in @file{/usr/lib} and @file{/usr/local/lib}.
|
reside, such as in @file{/usr/lib} and @file{/usr/local/lib}.
|
||||||
|
|
||||||
|
@var{library} should not contain an extension such as @code{.so}. The
|
||||||
|
correct file name extension for the host operating system is provided
|
||||||
|
automatically, according to libltdl's rules (@pxref{Libltdl interface,
|
||||||
|
lt_dlopenext, @code{lt_dlopenext}, libtool, Shared Library Support for
|
||||||
|
GNU}).
|
||||||
|
|
||||||
When @var{library} is omitted, a @dfn{global symbol handle} is returned. This
|
When @var{library} is omitted, a @dfn{global symbol handle} is returned. This
|
||||||
handle provides access to the symbols available to the program at run-time,
|
handle provides access to the symbols available to the program at run-time,
|
||||||
including those exported by the program itself and the shared libraries already
|
including those exported by the program itself and the shared libraries already
|
||||||
|
@ -196,12 +202,13 @@ In that case, you would statically link your program with the desired
|
||||||
library, and register its init function right after Guile has been
|
library, and register its init function right after Guile has been
|
||||||
initialized.
|
initialized.
|
||||||
|
|
||||||
LIB should be a string denoting a shared library without any file type
|
As for @code{dynamic-link}, @var{lib} should not contain any suffix such
|
||||||
suffix such as ".so". The suffix is provided automatically. It
|
as @code{.so} (@pxref{Foreign Libraries, dynamic-link}). It
|
||||||
should also not contain any directory components. Libraries that
|
should also not contain any directory components. Libraries that
|
||||||
implement Guile Extensions should be put into the normal locations for
|
implement Guile Extensions should be put into the normal locations for
|
||||||
shared libraries. We recommend to use the naming convention
|
shared libraries. We recommend to use the naming convention
|
||||||
libguile-bla-blum for a extension related to a module `(bla blum)'.
|
@file{libguile-bla-blum} for a extension related to a module @code{(bla
|
||||||
|
blum)}.
|
||||||
|
|
||||||
The normal way for a extension to be used is to write a small Scheme
|
The normal way for a extension to be used is to write a small Scheme
|
||||||
file that defines a module, and to load the extension into this
|
file that defines a module, and to load the extension into this
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue