
On 22 September 2004 21:37, Geoff C wrote:
Howdy,
I am trying to set up GHC with wxHaskell and run a couple of samples in Win2K Professional.
I have GHC in c:\Program Files\ghc-6.2.1\ and wxHaskell in c:\Program Files\wxhaskell-0,8\
The setup batch file for wxHaskell could not register the packages, or copy the DLL to the system32 directory. I manually copied the DLL, and tried to register the packages with GHC. I set the PATH environment variable to include the GHC directory.
I am typing the following commands and the command prompt:
ghc-pkg -u -i "c:\progra~1\wxhaskell-0.8\bin\wxcore.pkg" ghc-pkg -u -i "c:\progra~1\wxhaskell-0.8\bin\wx.pkg"
Each time, I get an error 'Unable to expand variable "wxhlibdir"' when the program is trying to expand embedded variables.
I went ahead and put GHC in my program file directory because I did not intend to use cygwin (which I understand has a problem with spaces in file/dir names). Usually, however, using "Progra~1" instead of "Program Files" allows programs which don't like spaces to run. Could this be the problem?
Looks like wxHaskell needs to set an environment variable when installing the package, but because you did it by hand you didn't have this environment variable set. Why didn't the normal wxHaskell install work for you? Cheers, Simon

Thank you, Simon! I did not get a "wxHaskell install". wxHaskell is a zip file, not an executable or a Windows installation file. The directions at the site are clear about simply unzipping it and running the wxhaskell-register.bat file. You are absolutely right about the environment variable. The batch file expected an environment variable named WINDIR, but it did not automatically exist on my computer (it is really named SYSTEMROOT). Instead of changing the bat file, I simply added the WINDIR environment variiable and then ran the batch file. (From the command prompt: SET WINDIR=C:\WINNT) Excellent! I typed in the first example at the "quick start" at the site, and it ran just fine. I can now compile any of the samples easily and run them. I am impressed with GHC, wxWindows, and extremely grateful for your help. Thank you, -- Geoff On Mon, 27 Sep 2004 14:20:19 +0100, Simon wrote:
Looks like wxHaskell needs to set an environment variable when installing the package, but because you did it by hand you didn't have this environment variable set.
Why didn't the normal wxHaskell install work for you?
Cheers, Simon
participants (2)
-
gaufridus@earthlink.net
-
Simon Marlow