[Haskell-beginners] error
Andy Larocque
ablaroc at gmail.com
Sat Jan 14 05:18:39 CET 2012
I've been trying to run this ( paint.hs) program ,shown below, in ghci -
but I get this error I don't know how to correct :
Loading package wxcore-0.13.2 ... can't load .so/.DLL for: stdc++
(libstdc++.so: cannot open shared object file: No such file or directory)
Does anyone know the fix for it? ( I got the same thing with the other
sample programs for wxHaskell)
---------------------------------------------------------------------------------
module Main where
import Graphics.UI.WXCore
import Graphics.UI.WX
main :: IO ()
main
= start gui
gui :: IO ()
gui
= do f <- frame [text := "Paint demo", fullRepaintOnResize := False]
sw <- scrolledWindow f [ on paint := onpaint
, virtualSize := sz 500 500, scrollRate := sz
10 10
, fullRepaintOnResize := False]
set f [clientSize := sz 150 150, layout := fill $ widget sw]
return ()
where
onpaint dc viewArea
= do circle dc (pt 200 200) 20 [penKind := PenDash DashDot]
arc dc (pt 100 100) 20 90 230 [color := red, penWidth :~ (+1),
penKind := PenSolid]
ellipticArc dc (rect (pt 20 20) (sz 60 30)) 90 230 [color :=
blue, penWidth :~ (*2)]
c <- get dc color
-- set dc [font := fontDefault{ fontFace = "Courier New",
fontSize = 16, fontWeight = WeightBold }]
set dc [fontFace := "Courier New", fontSize := 16, fontWeight :=
WeightBold ]
drawText dc (show c) (pt 50 50) []
rotatedText dc "rotated text" (pt 80 160) 45 [textColor := green]
----------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120113/5f3af6c3/attachment.htm>
More information about the Beginners
mailing list