
On 15/02/2012 19:51, Evan Laforge wrote:
On Wed, Feb 15, 2012 at 11:17 AM, Eugene Crosser
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.
I'm not sure why you're using the C++ compiler from hsc2hs, and I don't think that is guaranteed to work. But maybe we can fix it if there's a legitimate reason to want it. Cheers, Simon