/  4
 
InstallingwxHaskellon Windows XP
by SkyTreeBird 23-Sept-2010 
1 Introduction
After having no luck following thewxHaskell/Building wiki, I decided to take slightlydifferent approach. What follows is the process I went through to get wxHaskell workingon 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 1shows the recommended setup options.
Figure 1 - MinGW Setup
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.
2.3 Set Environment Variables
2.3.1 New Variables
a) Left click on
Start
.b) Right click on
My Computer
.c) Left click on
Properties
 
 
Advanced Tab
 
 
Environment Variables
d) Add the two environment variables shown circled in red inFigure 2by clicking on
New
-
Note: The value for 
WXWIN 
should correspond the actual location where you installed 
wxWidgets 
on your computer.
 
Figure 2 – Create the WXWIN & WXCFG Environment Variables2.3.2 Modifications to Existing ‘PATH’ Variable
a) Whilst still in the
Environment Variables
window, double click on the
PATH
 variable.b) Make the following appends, making sure everything is separated by a semi-colon(oh, and be careful not to delete any existing text):
C:\MinGW\bin
 
(ignore if you didn’t install MinGW)
C:\wx-config
(location of wx-config.exe)
eg:
existing-text;C:\MinGW\bin;C:\wx-config
 
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
(seeFigure 3).
Figure 3 - wxPack Setup
d) Append the
PATH
variable as you did in section2.3.2with the following text so thatyour executables can find the
DLL
’s:
C:\wxWidgets2.8.10\lib\gcc_dll
(location of your gcc_dll folder)
2.5 Install wxHaskell
a) Open up a
Command Prompt
and enter the following commands:
> cabal update> cabal install wx
Page 3 of 4

Share & Embed

More from this user

Recent Readcasters

Add a Comment

Characters: ...

Eric Kowleft a comment

Using %WXWIN% in the PATH is probably a bit better than repeating the info. Also, how about just putting your guide on the wiki, eg http://www.haskell.org/haskellwiki/Wx... ?