2015-12-14 21 views
1

我已經在Windows7的安裝 和wxwidget wxhaskell(使用陰謀),我做了一個test.hswxHaskell Win7上,不能wxc.dll找到或.so

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 
          ] ] 

,然後加載和運行test.hs在winGHCi,這裏是輸出

"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

這是一個GHCi錯誤;它在GHC 7.10.3中得到解決