1 Overview

This page describes how to get a working wxHaskell installation on various platforms. The latest release (version 0.10.3) was on 2008-03-23.

The installation process has become increasingly stable and simple, but some of the information on this page could become outdated. Current development on wxHaskell takes place in the darcs repository at http://darcs.haskell.org/wxhaskell .

2 Getting wxWidgets

wxHaskell 0.10.x does not yet support wxWidgets 2.8 (although the current darcs version does). Generally, the recommended version to use is 2.6.4 [2.6.3 on Debian/Ubuntu Linux] as it's what the binaries are compiled against.

Windows:

MacOS X

Tiger - do not use the wxMac 2.5 that comes pre-installed, unless you really want to compile from source and to report back on how everything works out.

Leopard - the darcs version of wxhaskell now (2008-04-25) supports wxWidgets 2.8. We don't know if the one that ships with Leopard works yet. Want to give it a try? Otherwise, we do know that it runs with a self compiled wxMac.

Linux - the wxWidgets that ships with your system (as long as it's the 2.6 one and not the 2.8 one) should work.

4.1.1 GHC 6.8.2, wxWidgets 2.6.4, wxHaskell 0.10.3rc1 (binary)

Note: wxhaskell-register.bat doesn't work when your wxHaskell directory either has spaces in its path, or is on the Desktop. So, you must move the wxHaskell directory to a directory in a path without spaces that is not on the Desktop if either of the two conditions above holds.

4.1.2 Assumptions (a.k.a. what I have tested)

wxWidgets built/installed in a path with no spaces in it. Actually you can use a path with spaces but there are a few rules. For example, I had ghc installed to this location:C:\Program Files\Visual HaskellSo this required me to use the following configure command:./configure --libdir=C:/Progra~1/Visual~1

The two important things here are: 1) You must use the forward slash
and 2) you cannot use spaces.

Next I found that I needed to add C:\Program Files\Visual Haskell to
my path so that the wxHaskell dlls could be located by windows.

Environment variables:

PATH should include MinGW and Cygwin binary directories. MinGW must come before Cygwin in PATH.

Build wxHaskell from the darcs repository, configured with ./configure --enable-split-objs -hcprof, and follow the usual installation documentation from here on. The --enable-split-objs and -hcprof options are not mandatory, but they are nice to have

Note 2008-02-20: there was a bug that made --with-opengl necessary on some systems (depending on how wxWidgets was built), but it has been fixed

/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: file: -lwx_macu_media-2.6 is not an object file (not allowed in a library)

Solution: try --enable-mediactrl in the wxWidgets configure

Too many levels of symbolic links (Linux)

UNKNOWN!

5.2 App-compilation issues

Could not find module `Graphics.UI.WX':

Solution Make sure you build and install the wx package too (wxhaskell comes in two parts, wxcore, which is what you get if you do ./configure; make; make install; and wx, which you can install by cd'ing into its directory and doing the standard Cabal stuff)

Certain buttons and widgets (particularly, those inside of "boxed" environments) are not active (still a problem, 2008-02-20)

Solution: upgrade to latest version (0.10.3 as of 2008-03-23). It was a wxHaskell bug that is now fixed.

I only see the first letter of every word

Solution build wxWidgets with --enable-unicode. (We now use wchar* to store strings; but if wxWidgets is compiled without unicode, it thinks it's using char* and that null bytes are string terminators)