Calling a Gambit function from C++
Are there any examples of integrating Gambit with C++? I'm looking for an example of how I should call a Scheme function within Gambit. I understand that all the Scheme code would be compiled but where would I find the "entry point" into Gambit and how would I call my Scheme function? Thanks, Joel -- OpenPoker: The Linux of poker software http://wagerlabs.com/forums
Afficher les réponses par date
I looked into the structure of C files produced by Gambit and figured that if I declared a Scheme function foo then I would call its handle in C would be something like ____20_foo. I'm sure there's other stuff that needs to be done before calling this function, though. I thought of copy-pasting Gambit's main.c into my main.cpp but I'm sure it's already part of libgambc.a. How do I resolve this? I suppose I want to initialize Gambit-C from my C++ main() and then call a Scheme function that 1) Takes a string and returns nothing and 2) Takes nothing and returns a string Any pointers would be extremely helpful since I'm completely lost among the obfuscated C code :-). Thanks, Joel -- OpenPoker: The Linux of poker software http://wagerlabs.com/forums
participants (2)
-
Joel Reymont -
Marc Feeley