[plt-scheme] Getting started embedding mzscheme in Windows/VS2008

From: jacmoe (jacmoe at mail.dk)
Date: Sat Feb 13 17:51:29 EST 2010

Hi PLT Schemers

I want to use Scheme as an extension language from C++, and thought
that PLT Scheme seems to be the most complete package.

But from reading the docs, I am left confused. :)

I want to use 3m for embedding, and this is the instructions you

>The simple embedding program from the previous section can be processed by mzc --xform, then compiled and linked with MzScheme3m

Er ? What am I supposed to do here?
Am I supposed to create base.c with the following command-line:
mzc --c-mods base.c ++lib scheme/base
And then what?
When linking to the mz library, the program doesn't do anything - it
crashes somewhere.
I also had to rename base.c to base.cpp and include scheme.h directly,
as I am using C++.
And I threw in a #define MZ_PRECISE_GC before including scheme.

Any other steps I need to do?
Or should I just use cgc, and worry about mz later?

Is there any other small example of embedding mzscheme in C++ ?

Thanks. :)

Posted on the users mailing list.