2011-07-14 22 views
14

頁面:(http://en.wikibooks.org/wiki/Haskell/GUI)描述了運行wx代碼,可以安裝wx,然後必須「註冊wxHaskell與GHC」 - 但我認爲wxHaskell(http://wxhaskell.sourceforge.net/download.html)的二進制安裝程序會自動執行此操作?運行wxHaskell問題(Windows)

我安裝了wx-config,然後是wxPack和wxHaskell。然後沒有陰謀安裝的WX和wxcore。我正在運行一些來自Leksah的wx演示,這些演示看起來大部分都很好 - 但他們有一些奇怪的錯誤(我發現了一個所謂的解決方案:「wxhaskell-labels-cant-display-full-text」),但我想嘗試一些來自GHCi的東西。

我試圖運行它們的簡單演示,和錯誤:

D:\csPlangs\Haskell\play>ghci -package wx wxGui1.hs 
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help 
Loading package ghc-prim ... linking ... done. 
Loading package integer-gmp ... linking ... done. 
Loading package base ... linking ... done. 
Loading package array-0.3.0.2 ... linking ... done. 
Loading package stm-2.2.0.1 ... linking ... done. 
Loading package bytestring-0.9.1.10 ... linking ... done. 
Loading package containers-0.4.0.0 ... linking ... done. 
Loading package Win32-2.2.0.1 ... linking ... done. 
Loading package filepath-1.2.0.0 ... linking ... done. 
Loading package old-locale-1.0.0.2 ... linking ... done. 
Loading package old-time-1.0.0.6 ... linking ... done. 
Loading package directory-1.1.0.0 ... linking ... done. 
Loading package transformers-0.2.2.0 ... linking ... done. 
Loading package mtl-2.0.1.0 ... linking ... done. 
Loading package parsec-3.1.1 ... linking ... done. 
Loading package time-1.2.0.3 ... linking ... done. 
Loading package wxdirect-0.12.1.4 ... linking ... done. 
Loading package wxcore-0.12.1.7 ... ghc.exe: stdc++: The specified module could 
not be found. 
<command line>: can't load .so/.DLL for: stdc++ (addDLL: could not load DLL) 

而且還包括[有意思]錯誤:

*Main> q 

<interactive>:1:1: Not in scope: `q' 
*Main> 
ghc.exe: panic! (the 'impossible' happened) 
    (GHC version 7.0.3 for i386-unknown-mingw32): 
     thread blocked indefinitely in an MVar operation 

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug 
+1

有一張票http://hackage.haskell.org/trac/ghc/ticket/5289 它被標記爲與linux相關的,但它可以更通用 – Yuras

回答

2

這似乎是一個已知問題的組合wxHaskell,GHCi和Windows。從http://www.haskell.org/haskellwiki/WxHaskell/Quick_start

On Windows 7, ghci will complain "can't load .so/.DLL for: std c++ ...". But ghc --make Hello.hs; Hello.exe on the command line works well.

所以,你可以編譯你的代碼。你不能通過解釋器來運行它。