[Haskell-cafe] Congrats. to wxHaskell
Jeremy O'Donoghue
jeremy.odonoghue at gmail.com
Tue Oct 14 04:41:53 EDT 2008
Hi Henk-Jan,
I fear that I may not be able to help as much as I would like, but I
did want to give a few pointers, specifically for building wxWidgets
correctly.
On Tue, 14 Oct 2008 00:53:57 +0200, "Henk-Jan van Tuyl"
<hjgtuyl at chello.nl> said:
>
[snip congrats from Dons - pleasing though they are :-)]
>
> I wish it were all that simple to me, but it turned out to be another
> session of eternal yak-shaving for me. My fault I suspect, I should have
> known better then to buy a Windows computer.
>
> I downloaded wxWindows 2.8.9 and tried to build it with the supplied
> makefile as
> suggested in the installation manual (I have MinGW and MSSY installed):
> make -f makefile.gcc BUILD=debug
> but makefile.gcc contains serious bugs.
The hardest part of building wxHaskell, paradoxically, is building
wxWidgets,
which is far from trivial, as there are a very large number of options.
I build for Windows using MS Visual Studio, so I can't help specifically
(and
I believe that other maintainers also use VS on Windows), but the
following
may help:
- Options in config.gcc for building wxWidgets
- UNICODE=1 is highly recommended (it's the only variant we really
test
nowadays)
- USE_OPENGL=1 is supported, if you wish
- USE_ODBC=1 is also supported
I only ever seem to have success when building wxWidgets as a library
(i.e.
not as a set of DLLs), although others seem to have success using DLLs,
so
it could just be me. Nonetheless, static libraries make a certain amount
of
sense, as you then have a single wxc DLL which makes redistribution of
binaries much simpler on Windows.
If VS2008 is available to you (and I understand that you may prefer not
to
install it, since the Express edition is only free in the sense of not
costing anything, and not free in most other senses), you'll probably
have
an easier ride, as the wxWidgets VS project files are always correct and
up to date.
> I then continued to build according to the build instructions on
> http://www.haskell.org/haskellwiki/WxHaskell/Building#building_wxWidgets_on_Windows
> but these instructions specifically state the contrib should be built and
> the first command to do this failed: cd contrib/src, because there is no
> such directory 'contrib'.
I just downloaded a clean copy of wxMSW-2.8.9.zip from Sourceforge. It
contains a
directory contrib/src with the expected contents, so I'm not sure why
you have a
problem here.
You need contrib for the styled text control support (basically a
wrapper around
Scintilla). It may be possible to build without stc, but it's not the
default build
invocation, and likely hasn't been tested in a while.
> Trying to install wxHaskell:
> > cabal install --global wx
> [...]
> install: /usr/local/lib/wxcore.o
> install directory: /usr/local/lib/
> install: /usr/local/lib/wxcore.pkg
> cat config/wxcore.pkg | sed -e "s|\${wxhlibdir}|/usr/local/lib|" |
> ghc-pkg
> update -
> Reading package info from stdin ... done.
> ghc-pkg.exe: /usr/local/lib/imports doesn't exist or isn't a directory
> (use --force to override)
> "make": *** [wxcore-register] Error 1
> cabal: Error: some packages failed to install:
> wx-0.10.5 depends on wxcore-0.10.5 which failed to install.
> wxcore-0.10.5 failed during the final install step. The exception was:
> exit: ExitFailure 2
>
> The directory /usr/local/lib/imports does exist and contains, amongst
> others, wx*.hi files.
>
> Questions:
> - Do I really need the contrib part of wxWidgets?
> - Where do I get it?
> - Why does "cabal install --global wx" fail? What can I do about it? (I
> have Administrator rights)
I'm afraid this part reads more like a cabal install issue. I'm having
problems
with it on my Windows box as well (it keeps telling me that exposed
packages are
hidden...).
Regards
Jeremy
--
Jeremy O'Donoghue
jeremy.odonoghue at gmail.com
More information about the Haskell-Cafe
mailing list