4

I am an struggling with using a C++ library I have just sucessfully compiled on ubuntu in sbcl.

I have tried to use the .h file parser 'ah2cl' but from the documentation it is not clear if I require UFFI or CFFI (is there a difference?). My attempts to use the dummy test library and the dummy header file provided with 'ah2cl' have failed. I get a message about a missing CALLBACK package from sbcl. But does sbcl not support callback natively ?

Is there another .h file parser that I should use for this kind of task ?

ajukraine
  • 561
  • 9
  • 27
  • 1
    AH2CL's [web page](http://hocwp.free.fr/ah2cl/) states that: "It produce (at the moment) ffi (foreign function interface) for **clisp** and for **uffi** (but callbacks are well tested **only with clisp and cmucl**)". So in the case of SBCL it's not tested well. Also please take a look at CFFI [wrapper generators](http://common-lisp.net/project/cffi/manual/html_node/Wrapper-generators.html#Wrapper-generators): [SWIG](http://www.cliki.net/SWIG) and [Verrazano](http://common-lisp.net/project/fetter/). – ajukraine Jul 14 '12 at 15:28
  • Ok, will try it with those other two. thanks – soren wilkening Jul 14 '12 at 22:20

1 Answers1

5

You might want to try CFFI's groveller, which parses header files to produce the corresponding CFFI bindings. BTW, UFFI is basically deprecated in favour of CFFI for a while now.

Nowhere man
  • 5,007
  • 3
  • 28
  • 44