[plt-scheme] Cooperating with 3m

From: Chongkai Zhu (u0476504 at utah.edu)
Date: Wed Jan 4 16:03:38 EST 2006

Thank you.

Now the ml.c file can be compiled correctly under 3m.

======= At 2006-01-02, 18:46:35 Matthew Flatt wrote: =======

>At Tue, 3 Jan 2006 02:33:14 +0800 (CST), mathematica at citiz.net wrote:
>> 4. <1.2  Embedding MzScheme into a Program>: "MzScheme3m can be embedded 
>> the same as MzScheme, as long as the embedding program cooperates with the 
>> precise garbage collector as described in section 3.1." But no explicit 
>> instruction of how to build such a program is given.
>
>I'll have to work on this. The MzScheme library name is the same as
>non-3m, except with "3m" in the name, and there's no separate GC
>library (because the GC is folded into the MzScheme library). Also, the
>embedding program must use scheme_set_stack_base() with non-zero
>arguments.

Only to link it with libmzscheme3m instead of libmzscheme? Must I also
make some change when compiling?

I tried to add
	#define MZ_PRECISE_GC
before
	#include "PLTHOME/include/scheme.h"
and then compile

Under Windows, I got

C:\\Program Files\\PLT-FULL-300.3\\include\\scheme.h(1412) : fatal error C1083:
Cannot open include file: 'gc2.h': No such file or directory

There is only a 'schemegc2.h' file.

Here is the corresponding part of 'scheme.h'

#ifdef MZ_PRECISE_GC
# ifndef GC2_EXTERN
#  define GC2_EXTERN MZ_EXTERN
# endif
# ifdef INCLUDE_WITHOUT_PATHS
#  if SCHEME_DIRECT_EMBEDDED
#   include "gc2.h"
#  else
#   define GC2_JUST_MACROS_AND_TYPEDEFS
#   include "schemegc2.h"
#  endif
# else
#  include "../gc2/gc2.h"
# endif

The error message under Linux is:

/usr/local/plt/include/scheme.h:1412:20: error: gc2.h: No such file or directory
In file included from /usr/local/plt/include/scheme.h:1578,

/usr/local/plt/include/schemef.h:356: error: syntax error before 'Size_Proc'

Help please! Many thanks.

>
>Matthew
>


Sincerely,
Chongkai Zhu  





Posted on the users mailing list.