Difference between revisions of "WxHaskell/Windows"

From HaskellWiki
Jump to navigation Jump to search
(Added subsection "Troubleshooting installation with cabal")
Line 21: Line 21:
 
|| 7 || 2011.2.0.1 || 2.8.12
 
|| 7 || 2011.2.0.1 || 2.8.12
 
|}
 
|}
  +
  +
=== Troubleshooting installation with cabal ===
  +
  +
These remarks refer to wx-0.13.2 and Haskell Platform 2011.4.0.0 on Windows 7.
  +
  +
Cabal package wx depends on wxcore which depends on wxdirect. By default cabal installs on a per user base, thus wxdirect.exe will be installed to <code>c:\Users\<YOUR NAME>\AppData\Roaming\cabal\bin\</code>. This folder must be in your <code>PATH</code> for <code>cabal install wxcore</code> to succeed.
  +
  +
Package wxcore-0.13.2 does not work well with wx-config revision 21 2006-10-19 (downloaded from [http://sites.google.com/site/wxconfig/ here] on Feb 2<sup>nd</sup> 2012). If <code>cabal install wxcore</code> fails with an output containing "Usage: wx-config [options]" try this:
  +
  +
* <code>cabal unpack wxcore</code>
  +
* <code>cd wxcore-0.13.2</code>
  +
* edit <code>Setup.hs</code> and comment out/remove the line containing <code>"wx-config" ["--version"]</code>
  +
* <code>runhaskell.exe Setup.hs configure --user</code>
  +
* <code>runhaskell.exe Setup.hs build</code>
  +
* <code>runhaskell.exe Setup.hs install</code>
  +
  +
Finally call <code>cabal install wx</code>.
   
 
== See also ==
 
== See also ==

Revision as of 06:02, 2 February 2012

Installing on Windows

Follow SkyTreeBird's guide. It which walks you through the basic steps

  • wx-config
  • wxPack
  • setting up environment variables
  • cabal install wx

Note that the best way to refer to WxWidgets in your PATH is probably to use the WXWIN variable that you set, eg. %WXWIN%/lib/gcc_dll

The guide has been tested with the following configurations. Others may work too:

Windows Haskell Platform wxWidgets
XP 2010.2.0.0 2.8.10
7 2011.2.0.1 2.8.12

Troubleshooting installation with cabal

These remarks refer to wx-0.13.2 and Haskell Platform 2011.4.0.0 on Windows 7.

Cabal package wx depends on wxcore which depends on wxdirect. By default cabal installs on a per user base, thus wxdirect.exe will be installed to c:\Users\<YOUR NAME>\AppData\Roaming\cabal\bin\. This folder must be in your PATH for cabal install wxcore to succeed.

Package wxcore-0.13.2 does not work well with wx-config revision 21 2006-10-19 (downloaded from here on Feb 2nd 2012). If cabal install wxcore fails with an output containing "Usage: wx-config [options]" try this:

  • cabal unpack wxcore
  • cd wxcore-0.13.2
  • edit Setup.hs and comment out/remove the line containing "wx-config" ["--version"]
  • runhaskell.exe Setup.hs configure --user
  • runhaskell.exe Setup.hs build
  • runhaskell.exe Setup.hs install

Finally call cabal install wx.

See also