[plt-scheme] Problem compiling a tutorial program

From: jblazi (jblazi at gmx.de)
Date: Wed Nov 6 08:52:19 EST 2002

I am trying to compile the following C-extension file from the documentation:

#include "escheme.h"
 Scheme_Object *scheme_initialize(Scheme_Env *env) {
   return scheme_make_string("hello world");
 }
 Scheme_Object *scheme_reload(Scheme_Env *env) {
   return scheme_initialize(env); /* Nothing special for reload */
 }
 Scheme_Object *scheme_module_name() {
   return scheme_false;
 }

This is the first example in the mzScheme manual. If I compile the file with

mzc --cc test1.c
mzc --ld test1.dll test1.obj

then it works smoothely. But if I rename it, it does not woork any more:

D:\cygwin\home\Administrator\mzscheme>ren test1.c test1.cpp

D:\cygwin\home\Administrator\mzscheme>mzc --cc test1.cpp
MzScheme compiler (mzc) version 202, Copyright (c) 1996-2002 PLT
"test1.cpp":
 [output to ".\test1.obj"]

D:\cygwin\home\Administrator\mzscheme>mzc --ld test1.dll test1.obj
MzScheme compiler (mzc) version 202, Copyright (c) 1996-2002 PLT
"test1.obj":
link-extension:
test1.obj(.eh_frame+0x11):test1.cpp: undefined reference to
`__gxx_personality_v
0'

Can anybody give me a hint?

TIA,
Janos Blazi



Posted on the users mailing list.