I have a Haskell program that uses gtk2hs, and would like to make a standalone Windows executable from it   (running ghc-6.10.3 and gtk2hs-0.10.1).  The program compiles ok with the –static ghc linker option, and the program runs fine on a Windows machine that has ghc and gtk2hs installed, but then when the executable is carried over to another Windows machine that doesn’t have gtk2hs installed locally, it fails to launch.  A dialogue box says it can’t find a DLL for lib-cairo; when the dependency on cairo was removed it then complains it can’t find DLL for lib-glade, and so on.


Is there a way to produce a Windows executable for an application so you can run it on a machine even if gtk2hs isn’t installed?



John O’Donnell


The University of Glasgow, charity number SC004401