Building from source on Windows
Instructions for building from source on Windows
- make sure you have GHC installed.
- install MinGW and MSYS from mingw.org.
MinGW provides a version of gcc and Windows development headers. MSYS is a unix style shell that we will need to run the configuration program and run the build process.
(If you would rather use cygwin, it would probably work too but it has not been tested.)
- install Gtk+ from gladewin32.sourceforge.net.
- You can use any version however the 2.10 version is now recommended and as a bonus it also has a much better native windows look, especially on Windows XP.
- You must install Gtk+ into a directory with no spaces in the name (i.e. not under “C:/Program Files/”).
- When installing Gtk+ you must select to “Register Environment Variables” and install “Devel headers/libraries”.
- Glade is Gtk’s visual GUI builder tool. You don’t need to install it but is good to have if you will be developing your own GUIs.
- download the Gtk2Hs source tarball into the directory where you want to build it, then from an MSYS shell window:
$ cd [dir where you downloaded it]
$ tar -xzf gtk2hs-0.9.11.tar.gz
$ cd gtk2hs-0.9.11
$ ./configure –prefix=C:/Gtk2Hs
$ make install
$ make installcheck #optional, this compiles all the demos
You’re done! You will now be able to compile and run Haskell programs that use Gtk2Hs.
Note that the
prefix passed to
./configure cannot be a MinGW style path, however it must use Unix-style ‘
/‘ path seperators rather than ordinary Windows ‘