How to install wxHaskell?

876 views Asked by At

I have downloaded the latest Haskell Platform(8.0.1 version) for Windows 7, wxWidgets-3.0.2, set all the needed environment variables. I have successfully installed "wxdirect" using "cabal install", but when I try to install "wxc" it fails. Install logs:

C:\wxWidgets-3.0.2\lib\gcc_dll\mswud\..: getDirectoryContents: does not exist
(The system cannot find the path specified.)
cabal: Leaving directory '.'

Where do I need to get that "gcc_dll\mswud\" folder?

P.S Neither Abriline nor Achelanne works for me for some reason.

P.P.S I tried to install this library following Haskell-wiki instructions, but it didn't work complaining about a ton of dependencies.

UPDATE I tried installing the wxHaskell using Haskell Platform 2014.2.0.0 with Abriline installer. It stopped on building wxc. Logs:

Building wxc
setup.exe: Maybe.fromJust: Nothing
 1] Compiling Main             ( wxc-0.92.2.0\dist\setup\setup.hs,     wxc-0.92.2.0\dist\setup\Main.o )
Linking .\wxc-0.92.2.0\dist\setup\setup.exe ...
The bitness is correct
Configuring wxc-0.92.2.0...
Configuring wxc to build against wxWidgets 3.0.2
cabal: Leaving directory '.\wxc-0.92.2.0'

UPDATE Extended logs with "cabal install wxc -v3": http://rgho.st/7BJcHzJTF

2

There are 2 answers

0
Phyx On

From the log it seems that maybe pkg-config is missing. From the platform's built in msys2 run pacman -S pkg-config and install it, see if it works after that.

0
Stéphane Laurent On

I've installed it as follows.

Set WXWIN=%CD%\wxWidgets Set WXCFG=gcc_dll\mswu Set PATH=%CD%;%PATH% cabal unpack wxdirect cabal install ./wxdirect-xxx (where xxx is e.g. 0.92.3).

  • Find the file wxdirect.exe and put it in the current directory.

  • Rename the file wxWdigets/include/wx/setup_redirect.h to wxWdigets/include/wx/setup.h

  • Type

cabal unpack wxc cabal install ./wxc-xxx

  • Find the file wxc.dll and put it in the DLLs folder.

  • Put the folders DLLs and wxWidgets\lib\gcc_dll in your search path.

  • Now you can install wxcore and wx.