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

Simon Marlow simonmar@microsoft.com
Wed, 17 Jul 2002 10:02:43 +0100


> Following up to Keean's message about problems with the RTS=20
> interface in=20
> ghc-5.04, we have also trouble with that.
>=20
> When compiling C code containing call-ins to Haskell, gcc=20
> will complain=20
> about RtsAPI.h as follows:
>=20
> /usr/local/lib/ghc-5.04/include/RtsAPI.h:125: syntax error=20
> before `const'
> /usr/local/lib/ghc-5.04/include/RtsAPI.h:126: syntax error=20
> before `const'
> /usr/local/lib/ghc-5.04/include/RtsAPI.h:125: storage size of=20
> `GHCziTopHandler_runIO_closure' isn't known
> /usr/local/lib/ghc-5.04/include/RtsAPI.h:126: storage size of=20
> `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