[plt-scheme] Windows extension linking change causes PLT 205 to crash?

From: Ron Stanonik (stanonik at Cogsci.ucsd.edu)
Date: Thu Sep 25 14:39:35 EDT 2003


We have an extension that worked in PLT 204, but causes PLT 205 on Windows
to crash.  What's unusual about the extension is that it is compiled with
Cygwin, rather than MSVC.  The extension is an X client, ported from unix,
which displays to the Cygwin XFree86 server.

I can reproduce the problem with a simple "hello world extension", which
I've appended.

I notice in the PLT 205 notes that

  Changed Windows extension-linking convention; extensions
  link directly to the MzScheme/GC DLLs

Any suggestions how to make an extension, compiled in Cygwin, work?


stanonik at cogsci.ucsd.edu

------------ makefile ----------------


arf.so: arf.o
        gcc -shared -o arf.so arf.o $(PLT)/lib/gcc/mzdyn.o

        -rm -f *.o *.so

------------ arf.c -------------------
#include "escheme.h"

static Scheme_Object *
sch_arf(int argc, Scheme_Object **argv)
  return scheme_make_string("hi");

Scheme_Object *scheme_reload(Scheme_Env *env)
    scheme_make_prim_w_arity(sch_arf, "arf", 0, 0), env);
  return scheme_make_string("Hello Arf!");

Scheme_Object *scheme_initialize(Scheme_Env *env)
  return scheme_reload(env);

Scheme_Object *scheme_module_name()
  /* This extension doesn't define a module: */
  return scheme_false;

Posted on the users mailing list.