Next: xctocc Syntax
Up: xctocc Overview
Previous: How does xctocc work?
For a file ``f.xc'', xctocc generates two files: ``f.cc''
and ``f.h''. ``f.cc'' contains all the glue code;
``f.h'' provides prototypes for the initializing function
for all classes and global function sets in the file. (``f.h''
contains a lot of other prototypes as well; these are used internally,
and provide checking across ``.xc'' files when you use them as
instructed below.)
For each C++ class c, xctocc generates a function
objscheme_setup_c, which takes a Scheme_Env *
parameter and returns void. For each global function set
named g, xctocc generates a function
objscheme_setup_g.
To link this code, do the following:
- Include all ``f.h'' files in
- the file that calls scm_basic_env to set up MzScheme in
an embedding program, or
- the file that defines scheme_initialize in an extension
- Using the a Scheme_Env * returned from scm_basic_env
or passed to scheme_initialize, call
each objscheme_setup_c.
The order is important: the set-up function of a superclass must be called
before the set-up functions of its subclasses.
- Compile each ``f.cc'' to an object file and link it to
the application/extension.
- Link the glue-function utility file ``xcglue.o'' to the
application/extension.
PLT