Revision as of 06:54, 2 July 2014

Contents

1 wxWidgets 2.9/3.0 and wxHaskell 0.90.x

Windows

Haskell Platform

wxWidgets

XP

2013.2.0.0

2.9.5

8.1

2013.2.0.0

2.9.5

XP

2013.2.0.0

3.0.0

8.1

2013.2.0.0

3.0.0

Prerequisites:

MinGW 5.1.6 and MSYS 1.0.11 (a recent version of MinGW will result in incompatible DLLs). You must select the C++ compiler and MinGW-make options when installing MinGW. Add the full path to directories MinGW\bin and msys\1.0\bin to your search path.

1.1 DLLs

The following file can be found in directory wxc\dist\build\, after building package wxc in directory wxc:

wxc.dll (be sure to recompile and copy this one when you compile your application with a new compiler)

Furthermore, the following DLLs need to be in the search path (these can be found in directory "Haskell Platform\2012.2.0.0\mingw\bin\", or in ghc-7.4.2\mingw\bin\ if you installed the compiler only (change revision as needed)):

libgcc_s_dw2-1.dll

libstdc++-6.dll

mingwm10.dll

Some wxHaskell applications also require the following DLLs:

uuid.dll

perl510.dll

libapr-1.dll

libapriconv-1.dll

libaprutil-1.dll

These DLLs can be obtained by installing XAMPP 1.7.4; the DLLs are in the directories:

xampp\perl\site\lib\auto\APR\UUID

xampp\perl\bin

xampp\apache\bin

If there are still DLLs missing, you can find out which, using cygcheck from the Cygwin project. Note, that you will get problems if you have both MinGW and Cygwin in your search path; it is best to specify the full path to cygcheck.exe, or copy cygcheck.exe to some location in the search path.
Sample command:

2 wxWidgets 2.8 and wxHaskell 0.13.x

Note that the best way to refer to WxWidgets in your PATH is probably to use the WXWIN variable that you set, eg. %WXWIN%\lib\gcc_dll

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 DLLs

In order to run a wxHaskell application, the following DLLs must be in the search path:

mingwm10.dll; this can be found in directory "Haskell Platform\2012.2.0.0\mingw\bin\", or in ghc-7.4.2\mingw\bin\ if you installed just the compiler (change revision as needed)

wxmsw28u_gcc_custom.dll

2.2 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 PATH for cabal install wxcore to 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 wxcore fails with an output containing "Usage: wx-config [options]" try this:

cabal unpack wxcore

cd wxcore-0.13.2

edit Setup.hs and comment out/remove the line containing "wx-config" ["--version"]