The Guile interpreter is available as an object library, to be linked into applications using Scheme as a configuration or extension language. This chapter covers the mechanics of linking your program with Guile on a typical POSIX system.
Parts III and IV of this manual describe the C functions Guile provides. Furthermore, any Scheme function described in this manual as a "Primitive" is also callable from C; see section Relationship between Scheme and C functions.
The header file <libguile.h>
provides declarations for all of
Guile's functions and constants. You should #include
it at the
head of any C source file that uses identifiers described in this
manual.
Once you've compiled your source files, you can link them against Guile
by passing the flag -lguile
to your linker. If you installed
Guile with multi-thread support (by passing --enable-threads
to
the configure
script), you may also need to link against the
QuickThreads library, -lqt
. Guile refers to various mathematical
functions, so you will probably need to link against the mathematical
library, -lm
, as well.
Go to the first, previous, next, last section, table of contents.