[plt-scheme] Adding C++ code to DrScheme.
At Wed, 14 Jul 2004 11:34:06 -1000, Kaveh Kardan wrote:
> Can someone point me to some docs about how to add some C++ code to
> DrScheme? I'm willing to have it statically linked in, so any docs on
> where to modify the makefiles and find examples of ffi calls would be
> appreciated.
For an example of a dynamically-linked extension implemented in C++,
see plt/collects/mzscheme/examples/tree.cxx. This is a fairly ambitious
example, because it makes the C++ class act like a Scheme class.
Other examples in that directory are written in plain C, and mostly
bind Scheme functions to call C functions.
To statically link code into DrScheme (MrEd really), you could modify
Makefile.in in plt/src/mred/ or the MSVC project in plt/src/worksp/,
then probably modify "mred.cxx" to call your setup code at the end of
setup_basic_env(). But I recommend a dynamic extension, instead.
Matthew