Personal tools

WxHaskell/Building with styledTextCtrl support

From HaskellWiki

< WxHaskell(Difference between revisions)
Jump to: navigation, search
m (WxHaskell/Building with StyledTextControl support moved to WxHaskell/Building with styledTextCtrl support)

Revision as of 02:22, 5 February 2010

If you are using styledTextCtrl and your program crashes with some "null object" error, try the following steps (tested with wxhaskell + 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)