Haskell Platform 2010.1.0.0 and wxHaskell on Windows

Edit: Please note that the issue described in this post has been fixed on newer versions of Haskell Platform, so you shouldn’t need to follow the instructions here.

Dan Haraj asked a question about installing wxHaskell on a Windows 7 machine. Since he was having problems, and since I have never verified wxHaskell installation on Windows 7, I agree to look into the problem.

Bottom line is that wxHaskell is fine on Windows 7, but there’s a problem with the Haskell Platform 2010.1.0.0 Windows installation. The issue is that the GHC version used doesn’t include C++ support, and wxHaskell needs this to build.

You have a couple of options for installing wxHaskell on Windows:

Just use an older Haskell Platform installer – these work fine.

Copy the required C++ support into Haskell Platform 2010.1.0.0 yourself from a MinGW installation. This is a horrible hack, as the files you will be copying to not correspond exactly to the MinGW version shipped in the Haskell Platform. They are close enough to work, however, if doing this doesn’t mortally wound your sense of software aesthetics.

You will need a copy of MinGW with gcc 3.4.5 installed, including C++ support. The automated installer at Sourceforge will install the same versions I used – just remember to tick the box marked ‘C++’ in the installer.

Out of interest, did you do this with the 2010.1.0.0 Haskell Platform or the older version? I agree about the potential problems of mixing MinGW platforms, but (with my wxHaskell maintainer hat on) I need to be able to get people going on the latest versions of tools, or they think the platform is going unmaintained.

Your approach is a little cleaner than mine, if it works for the latest Haskell Platform.

it seems to be a problem with multiple mingw installs. i have compiled wxHaskell using –extra-include-dirs and lib-dirs and pointed them to the mingw within Haskell. when it compiles (shown in -v3 verbose mode) it uses the Haskell platform binaries. yet at the linking stage it seems to be looking for the mingw on my local machine. any ideas on how to fix this ?
thanks.