WebHome
-
Courses
-
Publications
-
Contact
Projects & Software
-
EHC
--
Ruler
--
Shuffle
-
UHC
Other Software
-
SSM
- JAZY
Center
Master Program
Personal
Center
Home
Courses
People
Projects
Page
Edit Page
Rename Page
Attach File
Printable
Wiki Source
More ...
Web
Recent Changes
Notify Service
News
Page Index
Search
More ...
Wiki
About TWiki
Text Formatting
Registration
Change Password
Reset Password
Users
Groups
Log In
or
Register
Wx Haskell On Mac OSX
Atze
---++ Steps required to make a !MacOSX application using !WxHaskell, for GHC 7.0.3, dd 20110523 ---+++ Prerequisites * Install [[http://hackage.haskell.org/platform/][GHC 7.0.3]]. * Install [[http://mxcl.github.com/homebrew/][brew]], a package manager for !MacOSX. ---+++ wx * Install wx, using brew. Make sure no previous wx installation hangs around, in particular not in /usr/local/include and /usr/local/lib as suggested by the brew installation. <pre> $ brew install wxmac </pre> ---+++ wxHaskell * Install [[http://hackage.haskell.org/package/wx][wxHaskell]]. <pre> $ cabal install wx </pre> * Install [[http://hackage.haskell.org/package/cabal-macosx][cabal support for creating !MacOSX application bundles]]. <pre> $ cabal install cabal-macosx </pre> ---+++ Building a hello world app * Get the [[https://github.com/gimbo/cabal-macosx/tree/master/examples/wxHello][wx hello world example]] from the cabal-macosx archive. * In order to run on !MacOSX the following additional tweaks have to be made: * Follow [[http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X][these instructions]] to use enableGUI, which boils down to including/importing module !EnableGUI in your project, and calling enableGUI before the actual program is started up. * The thus imported module !EnableGUI requires the use of FFI, so the cabal file for the example needs ghc to use FFI, accomplished by (e.g.) the following line in the cabal file: <pre> ghc-options: -fwarn-tabs -threaded -Wall -ffi </pre> -- Main.AtzeDijkstra - 23 May 2011