As the offical site doesn’t release an installation buddle for GHC 6.10.4. It’s realy a pain to get gtk2hs working well. I achieve it by the following steps:
- install Haskell platform
- download and install mingw environment.Make sure that gcc, make, etc. work correctly(gcc-core, binutils, mingwrt, w32api, mingwutils, coreutils).
- download gtk-dev , and extract it into /
- export PKG_CONFIG_PATH=/lib/pkgconfig
- download and extract gtk2hs source buddle to anywhere you prefer.
- cd there. type : configure –without-pkgreg
- if everything goes well, make && make install
- Installed gtk2hs can be found in /usr/local/lib/gtk2hs
- replace /usr/local/lib/gtk2hs with a windows absoult path like D:/mingw/local/lib/gtk2hs / for each .conf
- register each .conf by ghc-pkg ….conf
- Well done. But running gtk application may fail with error saying libglib-2.0-0.dll cannot found. They are the gtk runtime library and can be found in /bin/.