WxHaskell/Building with styledTextCtrl support

From HaskellWiki
< WxHaskell
Revision as of 02:22, 5 February 2010 by Jcpetruzza (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

If you are using styledTextCtrl and your program crashes with some "null object" error, try the following steps (tested with wxhaskell 0.12.1.2 + wxwidgets 2.8.10 on OS X):


1) Reinstall wxcore with this additional flag:

> cabal install wxcore --ghc-options="-D wxUSE_STC=1" --reinstall

2) Reinstall wx:

> cabal install wx --reinstall

If step 1 fails, that probably means you don't have installed wxwidgets installed with stc support. Try reinstalling wxwidgets passing --with-stc to configure (and don't forget to run make also from the contrib directory!)

If all the steps above succeed, you might need to pass additional libraries in order to build your application. The following worked for me:

> ghc --make my-app.hs $(wx-config --libs std,stc)