win7上的wxHaskell,找不到wxc.dll或.so

时间:2015-12-14 14:12:21

标签: haskell wxhaskell

我在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?

1 个答案:

答案 0 :(得分:1)

这是一个GHCi错误;它在GHC 7.10.3中解决了