[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
27.4 Embedded Bigloo applications
It is possible to design and realize embedded Bigloo applications. This facility is useful for adding a new Scheme part to an already existing C program. The C part of the program has only to enter the Bigloo initialization, hence, it can call any Bigloo function.
Normally, Bigloo creates an initialization function called
main
when it reads a main
module clause. To use an
embedded Bigloo program, such an initialization function would have to
be created but with a different name. Changing the name can be
be done using the following Bigloo option:
-copt "-DBIGLOO_MAIN=<new-name>"
. To prevent exit from the
program after <new-name> is executed, the
following Bigloo option must be used:
-copt "-DBIGLOO_EXIT='BUNSPEC,'"
.
A very important part of designing embedded Bigloo programs is
being sure that all used Bigloo modules are correctly
initialized and the normal way to initialize them is to use
with
clauses in the module which contains the main
clause.
An example of an embedded program can be found in the distribution’s examples directory.
This document was generated on March 31, 2014 using texi2html 5.0.