1 wxWidgets 2.9 and wxHaskell 0.90.x
- MinGW 5.1.6 and MSYS 0.1.11 (these are the latest versions at the time of writing). You must select the C++ compiler option when installing MinGW.
- CABAL_DIR: C:\Users\XXX\AppData\Roaming\cabal
- GHC_VERSION: 7.0.3 (for our convenience)
- WXC_VERSION: 0.90.0.2
- WXWIN: C:\wxWidgets-2.9.3
- WXCFG: gcc_dll\mswu
- PATH: (add these) %WXWIN%\lib\gcc_dll;%WXWIN%;%CABAL_DIR%\wxc-%WXC_VERSION%\%GHC_VERSION%
- Download wxWidgets 2.9.3 source
- Extract to C:\wxWidgets-2.9.3
- Build wxWidgets-2.9.3
I (who?) compiled it as follows: edit wxwidgets-src-dir\build\msw\config.gcc so that the following values are set:
SHARED ?= 1 BUILD ?= release
Then (in cmd.exe, not bash):
cd wxwidgets-src-dir\build\msw mingw32-make -f makefile.gcc
- Download wx-config.exe (a new version for wxWidgets > 2.9) and copy it somewhere into your path, for instance via
cp wx-config.exe %CABAL_DIR%\bin
- Install the wxHaskell libraries
cabal install wxdirect cabal install wxc cabal install wxcore cabal install wx
2 wxWidgets 2.8 and wxHaskell 0.13.x
Follow SkyTreeBird's guide. It which walks you through the basic steps
- setting up environment variables
cabal install wx
Note that the best way to refer to WxWidgets in your PATH is probably to use the WXWIN variable that you set, eg.
The guide has been tested with the following configurations. Others may work too:
Windows Haskell Platform wxWidgets XP 2010.2.0.0 2.8.10 7 2011.2.0.1 2.8.12
2.1 Troubleshooting installation with cabal
These remarks refer to wx-0.13.2 and Haskell Platform 2011.4.0.0 on Windows 7.
Cabal package wx depends on wxcore which depends on wxdirect. By default cabal installs on a per user base, thus wxdirect.exe will be installed to
c:\Users\<YOUR NAME>\AppData\Roaming\cabal\bin\. This folder must be in your
cabal install wxcoreto succeed.
Package wxcore-0.13.2 does not work well with wx-config revision 21 2006-10-19 (downloaded from here on Feb 2nd 2012). If
cabal install wxcorefails with an output containing "Usage: wx-config [options]" try this:
cabal unpack wxcore
Setup.hsand comment out/remove the line containing
runhaskell.exe Setup.hs configure --user
runhaskell.exe Setup.hs build
runhaskell.exe Setup.hs install
cabal install wx.
3 See also