views:

426

answers:

4

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?

A: 

My guess is, you want to install the VC++ runtime redistributable files onto the target computer. The redistributable files for applications built with visual studio 2005 are available from here:

http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en

1800 INFORMATION
A: 

Seemed unlikely to me, but I tried nonetheless, and for no avail - it still crashes with the same very message.

Headcrab
+1  A: 

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

Chris
Installed service pack 1 redistributables - it works now.
Headcrab
A: 

Datapoint: Works for me on an XP sp2 box.

ja