[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding Scheme in C



Andrei Fomichev wrote:
> Is anybody have an example of using PLT Scheme as 
> an embedding entity in C program? More precisely,
> I need to call scheme function from C program passing
> some value to it (not something complex, just string),
> receive the result (string too) and continue to execute
> C program.
> 
> Additional clause. This Scheme function must work in
> different threads, created earlier by system call to OS
> (Windows, Solaris, etc.). But this threads don't interact 
> with each other. 

You can look at the MzCOM code for an example.  It's for
Windows, and contains some COM goop, but basically it's
just an embedded MzScheme.

Probably you should look at the latest CVS version.  Look
at http://www.cs.utah.edu/plt/anoncvs/.  The MzCOM sources
are in plt/src/mzcom/, and the file of interest is
mzobj.cxx.

Also, there are basic embedding instructions in the Inside PLT MzScheme
manual.

-- Paul