HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Note: new account creation has been disabled as an anti-spam measure.

WxHaskell/Windows

(Redirected from WxHaskell/Building on Windows)

< WxHaskell

Categories: WxHaskell

Contents

1 Building wxWidgets and wxc with Microsoft Visual C++

The advantage of using Visual C++ is that the resulting libraries are smaller and faster than the gnu compiled ones. Furthermore, the debug version provides for automatic detection of memory leaks in the wxWidgets libraries and you get a warning when forgetting to deallocate wxWidgets objects. The drawback is that the configure scripts are not used and you will need to set some options manually.

If you want to use Visual C++ Express Edition, you must use Visual C++ 2008 Express Editions or higher. Because previous version requires installing Microsoft Platform SDK before building wxWidgets or wxHaskell.

We use the wxWidgets provided workspace directly:

If you want to use database access, openGL canvas and Graphics Context, you must edit $wxwin/include/msw/setup.h's #define wxUSE_*(* is target feature name) from 0 to 1.

After building wxWidgets, you need to run configure for the wxHaskell library.

> cd $wxhaskell
> ./configure --with-msc

If you want to use the debug version of the library, use the --wxc-libname option too.

> ./configure --with-msc --wxc-libname=wxcd

After configuration, first run make command to generate stc_gen.* files.

> make

Make will stop by following error.

> make: *** No rule to make target `out/wxc/wxc-msw2.8.9-0.11.0.dll', needed by `wxc'.  Stop.

Then go $wxhaskell/wxc directory. Here, you need to adapt the wxc-<em>version</em>.dsp project to reference the correct wxWidgets directory. Open the .dsp file in an editor and replace all occurrences of "..\..\wxWindows-2.8.9" or by the installed wxWidgets directory, i.e. $wxwin.

After adapting the project file, you can open the workspace wxc/wxc-<em>version</em>.dsw and build the "Unicode Release" and "Unicode Debug" versions of the C wrapper library.

And finally! – you can run make in the $wxhaskell directory to build the Haskell libraries.

> cd $wxhaskell
> make
> make install
> make wx
> make wx-install

2 User experiences

2.1 GHC 6.10.1, wxWidgets 2.8.9, wxHaskell 0.11.0 (binary)

  1. Download the wxhaskell binary from sourceforge
  2. Unpack wxhaskell-*.zip. And double-click wxhaskell-*\bin\wxhaskell-register.bat.
  3. wxhaskell-register.bat install wxHaskell to your system.

2.2 Assumptions (a.k.a. what I have tested)

The two important things here are: 1) You must use the forward slash and 2) you cannot use spaces.

Next I found that I needed to add C:\Program Files\Visual Haskell to my path so that the wxHaskell dlls could be located by windows.

For more detailed information, see Installing wxWidgets 2.8.9 on Microsoft Windows 9x/ME, Windows NT, Windows 2000, Windows XP, and Windows CE.

3 See also

Retrieved from "http://haskell.org/haskellwiki/WxHaskell/Windows"

This page has been accessed 3,005 times. This page was last modified 16:07, 3 January 2009. Recent content is available under a simple permissive license.