[plt-scheme] Old FFI question

From: Peter Bex (Peter.Bex at student.kun.nl)
Date: Wed Feb 9 06:39:40 EST 2005

Hello list,

I'm trying to create a library for curses using PLT Scheme 209 with the old
FFI, but I can't find in the documentation how to call mzc correctly to
produce an extension.

This is my code:

========================== curses.scm ==========================
(c-declare "#include <curses.h>")

(define initscr (c-lambda () (pointer "WINDOW") "initscr"))

$ mzc ++ldf -lcurses curses.scm
MzScheme compiler (mzc) version 207, Copyright (c) 2004 PLT Scheme, Inc.
 [output to "./curses.so"]

$ mzscheme
Welcome to MzScheme version 207, Copyright (c) 2004 PLT Scheme, Inc.
> (load-extension "curses.so")
load-extension: "/home/sjamaan/src/test/curses.so" is not an extension (Undefined symbol "_scheme_initialize_internal")

(yes I know, this is 207, but 209 on another system gives the same error)

What should I do to get this working?  I can't find this documented anywhere.

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20050209/994fe8b8/attachment.sig>

Posted on the users mailing list.