I have installed wxwidget and wxhaskell(using cabal) on windows7 and I made a test.hs
import Graphics.UI.WX
main :: IO ()
main = start gui
gui :: IO ()
gui = do f <- frame [text := "Hello"]
inp <- entry f []
out <- entry f []
but <- button f [ text := "Hello"
, on command := do s <- get inp text;
set out [text := "Hello "++s]
]
set f [ layout := floatCentre $ column 5
[ label "What is your name?"
, widget inp
, widget but
, widget out
] ]
and then I load and run test.hs in winGHCi, and here is output
"ghci> " :load "test.hs"
[1 of 1] Compiling Main ( test.hs, interpreted )
Ok, modules loaded: Main.
"ghci> " main
can't load .so/.DLL for: C:\Users\zhaijy\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.2\wxc-0.92.1.1-2q6ESjcRWaMHNPxrdblcRv\wxc.dll (addDLL: could not load DLL)
"ghci> "
I can't figure out how to solve this problem. What do I need to do/add/change so the DLL could be loaded?