1

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 をロードできるようにするには、何を行う/追加する/変更する必要がありますか?

4

1 に答える 1