我已经在 windows7 上安装了 wxwidget 和 wxhaskell(使用 cabal),我做了一个 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
] ]
然后我在winGHCi中加载并运行test.hs,这是输出
"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> "
我不知道如何解决这个问题。我需要做什么/添加/更改才能加载 DLL?