Personal tools


From HaskellWiki

< WxHaskell(Difference between revisions)
Jump to: navigation, search
(wxWidgets 0.90)

Revision as of 22:26, 13 April 2012

1 Prerequisites

Ensure you have a recent GHC compiler – version 7.0 or higher is recommended.

  • Windows: You will need wx-config for Windows, MinGW 5.1.6 and MSYS 0.1.11 (these are the latest versions at the time of writing). You must select the C++ compiler option when installing MinGW.
    • MinGW 5.1.6 can be downloaded from MinGW
    • MSYS 0.1.11 can be downloaded from MSYS
    • wx-config can be downloaded from wx-config
  • Mac OS X: you need to install the gcc compiler, which is part of the Apple Developer Tools.

At the time of writing, there are few pre-packaged wxWidgets 2.9.x libraries, so you are best just downloading the latest version from The wxWidgets website.

We assume in this guide that the variable $wxwin points to your wxWidgets installation directory, for example: ~/dev/wxGTK-2.8.10.

2 Building wxWidgets

MacOS X Lion: I built wxWidgets with most of the optional libraries as follows:

./configure --enable-unicode --disable-debug --with-osx_cocoa
            --prefix=/usr/local --enable-stc --enable-aui
            --enable-propgrid --enable-xrc --enable-ribbon
            --enable-richtext --enable-webkit --with-opengl
make && make install

Windows 7: I built wxWidgets as follows:

Edit wxwidgets-src-dir\build\msw\config.gcc so that the following values are set:

BUILD ?= release

Then (in cmd.exe, not bash):

cd wxwidgets-src-dir\build\msw
mingw32-make -f makefile.gcc

The required wx-config for building on Windows with wxWidgets 2.9.x is currently hosted on Sourceforge - binary only and as source code on, and only obtainable if you pull the complete repository. The version of wx-config at will not work (it is only suitable for wxWidgets 2.8.x)