On 10/30/07, Marc Feeley feeley@iro.umontreal.ca wrote:
On 30-Oct-07, at 5:33 PM, naruto canada wrote:
hi
Can gambit-c fulfill this requirement? Let's say I have to implement some numerical library, and given some C headers files and description for what the library should do, and the C interface can not be changed for binary compatibility and ABI reason. The library is simply numerical and no IO or system call allowed (except malloc, free, and fprintf for debug). Can Hobbit generate C code that is suitable for linking and embeding in other project? There is no need for an interpreter.
I assume you mean Gambit (Hobbit is actually the name of another Scheme compiler)...
Sorry, I send four messages to scm gambit-c chicken and bigloo lists, and scm is first one.
Let me rephrase. You want to implement a C API in Scheme. The "main program" is in C, and it will call Gambit indirectly through the API. Yes that is possible. Check the code in tests/client.c (the "main program") and tests/server.scm (the Scheme implementation of the API).
So basically, Gambit-c has all necessary c-types, good. Thanks, will look at it now.
Marc