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)
(Added category wxHaskell)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
If you are using styledTextControl 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):
+
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:
 
1) Reinstall wxcore with this additional flag:
   
> cabal install wxcore --ghc-options="-D wxUSE_STC=1" --reinstall
+
> cabal install wxcore --ghc-options="-DwxUSE_STC=1 -optc-DwxUSE_STC=1" --reinstall
 
 
 
2) Reinstall wx:
 
2) Reinstall wx:
Line 15: Line 15:
   
 
> ghc --make my-app.hs $(wx-config --libs std,stc)
 
> ghc --make my-app.hs $(wx-config --libs std,stc)
  +
  +
  +
[[Category:wxHaskell]]

Latest revision as of 20:54, 15 January 2012

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="-DwxUSE_STC=1 -optc-DwxUSE_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)