[C2hs] available.h on Mac (bug #6)
jwlato at gmail.com
Wed Jul 23 01:50:23 EDT 2008
I recently ran up against bug #6 on a Mac (Leopard 10.5.2, c2hs
.15.1). This results in the error
c2hs: Error in C header file.
/usr/include/available.h:85: (column 5) [FATAL]
>>> Lexical error! The character '#' does not fit here.
I added some information to the bug report based on my
experimentation, and would like to say that I've found a workaround.
By running c2hs with these options:
--cpp=gcc --cppopts=-E --cppopts=-xc
I was able to successfully build the interface. This works with cabal
builds as well by passing the options during configure with
I'm pretty certain that this is due to some sort of failure in Apple's
cpp and not a problem with c2hs. Can anyone else confirm this?
More information about the C2hs