Thursday, 28 January 2010

Installation of gtk, gtk2hs, glade and leksah on windows XP

Step 1: Intall ghc
Download ghc 6.10.3 and install it at default destination.

Step 2: Install cabal
Download cabal for windows and install. This didn't work for me so alternately I used the tar file;
pathtofile\ghc --make Setup.hs
runghc Setup configure
runghc Setup build
runghc Setup install
cabal update

Step 3: Install gtk
Download gtk for windows from and install at the default location.

Step 4: Install gtk2hs
Download gtk2hs-0.10.1-win32-installer and download at default location.

Note: Glade is now in the package list.
on prompt write "ghc-pkg list" to see the installed packages

Step 5: Glade Editor
  • Download glade3
  • untar the folder at any location
  • in the bin folder you will find the glade-3 executable file
Step 6: Leksah
Method I: cabal install leksah

Mathod II: Download the Leksah- and install at default location.

Method III:
  • Download the binary source tar from hackage
  • untar and and go to the path and wrtie on cmd prompt
pathtofolder\cabal install
This will give error : cannot find -lgtksourceview-2.0

Solution is given in the Leksah FAQ#12,
pathtofolder\cabal install


  1. installing cabal:
    i downloaded the cabal tar file and unpacked it. then i downloaded the cabal.exe and put it in the same folder. cd to this folder and run 'cabal.exe install' - this did all the necessary steps.

    afterwards - do not forget to

    cabal update


    cabal install cabal
    (to get the newest version

  2. when i installed gtk2hs from the downloaded exe it complained that it could not find ghc (and requested 6.10.3 - i had 6.10.4).
    i let it run nevertheless and then did, what the specific instruction in the unpacked files said:

    Then add the bin folder to your PATH. Make sure you have no other
    versions of GTK+ in PATH. Run:
    pkg-config --cflags gtk+-2.0
    and verify that it prints out something reasonable. Run:
    and verify that it works.

    Note: after you added the path (right click on my computer -> properties -> advanced -> environment variables (at the bottom). copy/paste the path from the file browser).
    afterwards: open a new terminal (the env variables are read in only when you open the terminal!)

  3. the above described trick did not work. you need 6.10.3 (and must it now get from one of the 'old versions' pages on