location of HsFFI.h?
Simon Marlow
simonmar at microsoft.com
Wed Oct 30 04:12:01 EST 2002
> I was wondering whether there was any standard way to find HsFFI.h? I
> can hardcode it into my makefiles for my own projects, but when i
> distribute code, I end up having to add -I lines for every possible
> location of it, usually multiplied by every compiler version
> it supports
> since that is often also in the path name. (and no, hmake is
> not really
> an option. pure make is my tool). perhaps some option to the haskell
> compiler which spits out the appropriate flags to pass to the C
> compiler.
If you're using GHC, the trick is to use GHC to compile your C code too
because it adds the appropriate -I flag to the gcc command line.
If this isn't possible, then you can extract the information from the
output of 'ghc -v'. The relevant directory is in the include_dirs field
of the rts package.
Cheers,
Simon
More information about the FFI
mailing list