RE: RtsAPI.h (was Re: new RTS interface problem with ghc-5.04)

Following up to Keean's message about problems with the RTS interface in ghc-5.04, we have also trouble with that.
When compiling C code containing call-ins to Haskell, gcc will complain about RtsAPI.h as follows:
/usr/local/lib/ghc-5.04/include/RtsAPI.h:125: syntax error before `const' /usr/local/lib/ghc-5.04/include/RtsAPI.h:126: syntax error before `const' /usr/local/lib/ghc-5.04/include/RtsAPI.h:125: storage size of `GHCziTopHandler_runIO_closure' isn't known /usr/local/lib/ghc-5.04/include/RtsAPI.h:126: storage size of `GHCziTopHandler_runNonIO_closure' isn't known
Two possible workarounds for now: either #include "Rts.h" before "RtsAPI.h", or edit RtsAPI.h directly: in the declarations for GHCziTopHandler_runIO_closure and GHCziTopHandler_runNonIO_closure remove 'DLL_IMPORT'. Also, if you're using GCC 3.1, you might have to remove 'const' too. Cheers, Simon
participants (1)
-
Simon Marlow