[Haskell-cafe] Including a "XXX_stub.h" file from another Haskell library?

Alp Mestanogullari alpmestan at gmail.com
Mon Feb 8 13:34:19 UTC 2016


Hello -cafe!

Let's say I have two Haskell libraries, `A` and `B`.

`A` uses the FFI, `foreign export` to be precise, to make a Haskell
function available to C land. This generates a "stub" C header file with a
corresponding C function declaration.

`B` has some C code in it and needs to include the stub header that was
generated when compiling `A`, in order to call the function that I 'foreign
export'ed in A.

When I "naively" include the stub header file for the module in A that
contains the 'foreign export' statement, inside one of the C files of the
`B` library, the said header can't be found.

Is what I want to do at all possible? If yes, how could I make this work?

Thanks!

-- 
Alp Mestanogullari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160208/865f956e/attachment.html>


More information about the Haskell-Cafe mailing list