[Hat] Compiling Hat on Windows
ndmitchell at gmail.com
Sat Sep 17 18:19:59 EDT 2005
I decided to try compiling Hat on Windows, just the viewing tools,
using only the standard Windows tools and those things which get
installed by GHC for Windows. It worked with a few tweaks/changes, so
I thought I'd document them here:
gcc -c *.c -DFILEVERSION="\"2.04\"" -DVERSION="\"2.04\""
(hat-anim.c fails totally)
ghc --make HatCover.hs -cpp -fglasgow-exts artutils.o finitemap.o pathutils.o
ghc --make BlackHat.hs -cpp -fglasgow-exts artutils.o finitemap.o
In addition I also commented out the 4th line in finitemap.h, #include
"checkglib.h". Creating an empty checkglib.h would have solved this
I also commented out the signal lines in hat-check.
I also copied art.h into the tools directory, although an -I flag
would have worked here instead.
I also defined ntohl myself, since its not defined in any of the
default C libraries on Windows.
unsigned long ntohl(unsigned long netlong)
With these changes I could get compiled versions of most of the tools.
More information about the Hat