[Haskell-beginners] wxHaskell path

Miguel Negrao miguel.negrao-lists at friendlyvirus.org
Wed Jun 6 10:04:41 CEST 2012


A 06/06/2012, às 00:39, Henry Lockyer escreveu:

> Hi all 
> Trying to work out how to get wxHaskell correctly installed on mac os x (10.6.8 snow leopard).
> Have decided to try and get the older version working (0.13) so as to use the pre-installed
> wxWidgets (2.8.8 it seems).  I was looking at the wxHAskell install info for mac os x at 
> (1) http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X   -  which only talks about widgets 2.9,
> but I have now been reading
> (2) http://www.haskell.org/haskellwiki/WxHaskell/2.8 
> 
> Question: 
> The variable "$wxwin" is referred to in the page at link (2) above, where it says: 
> "We assume in this guide that the variable $wxwin points to your wxWidgets installation directory, for example: ~/dev/wxGTK-2.8.10."
> And in the page at link (1), step 3, it says:
> "Check your path to make sure you are using your wxWidgets and not the default Mac one"
> 
> Are these referring to the same thing?  ( I had originally interpreted 'path' as referring to $PATH.)
> 
> The reference to $wxwin is in instructions for building wxWidgets 2.8 which I should not need to do if I am 
> using the already installed 2.8.8 widgets library, but if I echo $wxwin it is blank and does not therefore appear to
> point to my wxWidgets installation directory.
> Is this an issue or is it only relevant to the initial build process for wxWidgets?
> 
> Can anyone throw any light on this?

Not exactly what you are asking for but I recently installed wxHaskell latest version  with wxWidgets 2.9 on osx 10.7.3 successfully using the instructions here http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X and some help from the list.

 I installed wxWidgets from homebrew (http://mxcl.github.com/homebrew/) which is very easy to do, a one liner. I think the 2.9 version is much better for osx, it has 64 bit support and uses cocoa:

"2.9 series bring many improvements compared to 2.8 series such as much better and simpler to use support for Unicode and the new wxOSX/Cocoa port, suitable for development of 64 bit GUI applications under OS X, as well as a huge number of other new features and bug fixes."

It should be something like:

brew install wxmac --devel

then

cabal install wx cabal-macosx

or if have issues  with the command above install the correct versions of the dependencies in the right order by hand:

   cabal install wxdirect-0.90.0.1
   cabal install wxc-0.90.0.3
   cabal install wxcore-0.90.0.1
   cabal install wx-0.90.0.1
   cabal install cabal-macosx

When I did this I got it working inside EclipseFP although I couldn’t get ghc to compile a hello world program, which I guess means I should be passing it some flag that I don’t know about.

Hope this helps,
Miguel Negrão





More information about the Beginners mailing list