2011-07-14 15 views
14

La página: (http://en.wikibooks.org/wiki/Haskell/GUI) describe que para ejecutar el código wx, uno puede instalar wx y luego uno debe "registrar wxHaskell con GHC" - pero creo que el instalador binario de wxHaskell (http://wxhaskell.sourceforge.net/download.html) lo hace automáticamente?problema al ejecutar wxHaskell (Windows)

Instalé wx-config, y luego wxPack y wxHaskell. y luego instaló cabal de wx y wxcore. Estoy ejecutando algunas demostraciones wx de Leksah, que parecen bastante buenas, pero tenían algunos errores extraños (encontré una supuesta solución a eso: "wxhaskell-labels-cant-display-full-text"), pero quería probar un poco cosas solo de GHCi.

trato de ejecutar sus demos simples, y los errores:

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) 

Y también el [interesante] Error:

*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

Hay un ticket http://hackage.haskell.org/trac/ghc/ticket/5289 Está marcado como relacionado con Linux, pero puede ser más general – Yuras

Respuesta

2

Parece ser un problema conocido con la combinación de wxHaskell, GHCi y Windows. De 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.

Por lo tanto, se puede compilar el código. Simplemente no puedes ejecutarlo a través del intérprete.

Cuestiones relacionadas