[Haskell-beginners] wxHaskell path

Henry Lockyer henry.lockyer at ntlworld.com
Wed Jun 6 13:31:16 CEST 2012

Thanks a lot Miguel.   I recently discovered your posts about 'reactive banana' and wxHaskell and started looking through them.

Unfortunately I am a c/c++ compilation/make/etc. and general unix newbie, or oldbie in my case, (amongst many other areas of deep ignorance ;-)
so I am finding some of the information/instructions a little hard to follow.

I went for version 2.9 of widgets first, as it seemed better, for the reasons you mention. 
In fact the wxHAskell mac-specific advice only refers to 2.9, on the page you refer to.

I downloaded 2.9.3 from wxWidgets.org as I'm not familiar with homebrew. 
I followed the wxWidgets installation instructions to build it. Which mostly seemed to be OK but with a warning about QuickTime
which is evidently a 32 vs 64 bit issue.

I tried to make sure everything was OK at each step before going on to the next one, to avoid Too Many Variables syndrome,
so before installing wxHaskell I checked out wxWidgets 2.9.3 with some of the demos. Some of them did not seem
to be working quite right, also I had questions about the path variable, removing the 2.8.8 libraries, 32 vs 64 bit, QuickTime etc.
and started thinking it might be more efficient to just go with the existing 2.8.8 widgets in the meantime, but then immediately
hit the $wxwin question !

I did wonder if $wxwin might be specific to Windows, but on the wxHaskell page I linked below it is in the main flow of the
text rather than in the Windows/MacOSX-specific parts.

I posted my earlier questions on the "wxhaskell-users" list but it seems a bit quiet there so I might re-post them here. 

How did you establish that your wxWidgets was installed and working as expected, 
and can I ask how you removed the pre-loaded mac os version of widgets (if you had this) ?

Regards/ Henry

On 6 Jun 2012, at 09:04, Miguel Negrao wrote:

> 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-
>   cabal install wxc-
>   cabal install wxcore-
>   cabal install wx-
>   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
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

More information about the Beginners mailing list