[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] extended FFI example
From: |
Elliot Cuzzillo |
Subject: |
[Chicken-users] extended FFI example |
Date: |
Thu, 4 Jan 2007 17:37:38 -0500 |
I'm interested in using Chicken for a robot programming research
project; the project already has a large C++ codebase, and the API
requires the programmer to provide an "updateControl" function which
it calls ~500 times a second. Sounds like a job for an FFI.
So I looked at Chicken's FFI, and found "An extended FFI example" at
http://chicken.wiki.br/An%20extended%20FFI%20example
It appears to be rather untested, and possibly completely broken. It
had several syntactic errors right off the bat, (e.g. no quotes around
things that needed to be strings) and now I have the error "Error:
illegal foreign type `GtkWidget'" because it never seemed to have
declared a foreign type GtkWidget, which I surmise from the manual is
necessary. However, I don't understand exactly what is supposed to
happen with declaring foreign types, because I've never used the FFI
before and cannot find an example anywhere. (Googling was fruitless.)
Has anyone tried to get this working? I do have the easyffi egg
installed. I'm running Chicken 2.5. Alternatively, another example of
C calling Scheme would probably do the trick.
Elliot
- [Chicken-users] extended FFI example,
Elliot Cuzzillo <=