[plt-scheme] Output from compile-extension-parts-to-c
I have managed to produce a stand-alone native
executable for linux using
"compile-extension-parts-to-c" and
"glue-extension-parts". Since I'm embedding MzScheme
in my application I have to explicitly initialize the
extension. For that I use the following code that I
borrowed from "cmdline.inc".
{
Scheme_Object *f, *a[1];
f = scheme_initialize(e);
a[0] = scheme_true;
f = _scheme_apply_multi(f, 1, a);
if (SAME_OBJ(f, SCHEME_MULTIPLE_VALUES) &&
(scheme_multiple_count == 2))
{
f = scheme_multiple_array[0];
_scheme_apply(f, 0, NULL);
}
}
This works well under linux. But in my windows version
I get a segmentation fault when executing the test
"(scheme_multiple_count == 2)" in the if-statement.
Since I'm cross compiling the windows version from
linux, I was wondering if perhaps
"compile-extension-parts-to-c" produce different
c-files when run under linux, than when run under
windows. Is this the case? I was unable to test this
because even under linux
"compile-extension-parts-to-c" produces a different
c-file each time I run it. Is this due to the compiler
using the "random" function (it seems to use the same
seed though) or is it somehow linked to the scheme
macro system? Can it be made to produce the exact same
output from one run to another?
I have a feeling the segmentation fault may be due to
something else, but it would be nice to rule out this
uncertainty. (By the way, the cross compiled windows
executable worked well as long as I didn't compile the
scheme code to C.)
Ulf
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com