Professional Documents
Culture Documents
by SkyTreeBird 23-Sept-2010
1 Introduction
After having no luck following the wxHaskell/Building wiki, I decided to take slightly
different approach. What follows is the process I went through to get wxHaskell working
on Windows XP. It worked for me, hope it helps others.
2 Process
2.1 Install MinGW - Optional
a) Download MinGW – Note: MinGW is a ‘free’ compiler. Because we are going to be
using wxPack, which comes with pre-built binaries (ie pre-compiled files) you can
skip this section. However, in my experience it is wise to have it installed.
b) Run the downloaded executable - Figure 1 shows the recommended setup options.
Page 1 of 4
2.2 Setup wx-config
a) Download wx-config. This is a standalone executable, no install required.
b) Create a folder eg ‘C:\wx-config’ and drop the wx-config.exe into it.
d) Add the two environment variables shown circled in red in Figure 2 by clicking on
New - Note: The value for WXWIN should correspond the actual location where you
installed wxWidgets on your computer.
Page 2 of 4
2.4 Install wxPack
a) Download wxPack
b) Run the wxPack executable.
c) From the setup menu, select MinGW Gcc Only (see Figure 3).
d) Append the PATH variable as you did in section 2.3.2 with the following text so that
your executables can find the DLL’s:
C:\wxWidgets2.8.10\lib\gcc_dll (location of your gcc_dll folder)
Page 3 of 4
2.6 Mind the Gaps…
a) For some reason, when I first tried to run the Hello.hs test program, I was greeted
with some ‘mingwm10.dll’ error nonsense. This was solved by making the following
‘additional’ append to the PATH variable (see Section 2.3 for details on how to do
this):
C:\Program Files\Haskell Platform\2010.2.0.0\mingw\bin
b) If you want to avoid any nasty ‘can’t load .so/.DLL for: std c++’ tantrums, I
recommend using GHC (as opposed to GHCi) to compile your wxWidgets
executables, eg:
> ghc –package wx Hello.hs –o hello
…or, if you don’t want the annoying Command Prompt popping up every time you
run your executable:
> ghc –optl-mwindows –package wx Hello.hs –o hello
3 Feedback
Hopefully, everything should be working fine - at least it was for me. I would appreciate
peoples feedback on this guide (ie was it helpful / unhelpful) so that I can decide what to
do with it (ie scrap it / develop it, put it into a wiki etc).
Thanks,
SkyTreeBird
Page 4 of 4