recent changes to hsc2hs break wrapping c++

Evan Laforge qdunkan at gmail.com
Wed Feb 15 20:51:12 CET 2012


On Wed, Feb 15, 2012 at 11:17 AM, Eugene Crosser <crosser at average.org> wrote:
> On 02/15/2012 09:59 PM, Evan Laforge wrote:
>
>> Unfortunately, the result is I (apparently) can't use it now.  Here's
>> how that happens:  The change was to remove the dependency on HsFFI.h.
>
> Evan, *if* including HsFFI.h is the only thing you need, you might try to add
> "-i HsFFI.h" to your hsc2hs rule.

Well, the main thing is that the C++ compiler chokes on the C stub
file created.  So as long as it creates and tries to compile that with
the compiler given in '-c' then it'll crash.  I guess another solution
would be a separate '-c' flag for the compiler used for the stub :)

> The problem still stands because we cannot expect every module author to do the
> same.

I think it's not too big a burden since for ghc it's just -I$(ghc
--print-libdir)/include, and Duncan makes a good case for requiring
it.



More information about the Glasgow-haskell-users mailing list