Search code examples
windowshaskellghcwxhaskell

GHC + wxHaskell on Windows


Have GHC 6.8.3 and wxHaskell-0.10.3 on a Windows XP computer. Installed both as binary distributions, not by building from sources. Built a sample with the following command:

ghc --make Paint.hs

It works on that same computer it was built on (with GHC and wxHaskell installed), but fails if transferred to another one (with neither of them installed). It throws an "Application error" box with "The application failed to initialize properly (0xc0150002). Click OK to terminate the program."

The only non-system dll it wanted was wxc-msw2.6.4-0.10.3.dll, which I copied to it's folder.

What might be the reason?


Solution

  • The error comes from dependencies that are mentioned in the manifests of DLL's (presumably the third-party ones with wxHaskell) that your system is expecting to find installed in places such as WinSxS and SoftwareDistribution in your Windows directory. I am guessing the wxHaskell installation puts the files there.

    You may be able to find what files the program is looking for by looking in the event viewer on the failed machine. You may even be able to fix them by moving the files from a working machine, However, VC++ 2005 runtimes are the most likely, as suggested - the wxHaskell troubleshooter suggests you try the VC++ 2005 service pack 1 redistributables:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=200b2fd9-ae1a-4a14-984d-389c36f85647&DisplayLang=en