页面:(http://en.wikibooks.org/wiki/Haskell/GUI)描述了要运行wx代码,可以安装wx,然后必须“向GHC注册wxHaskell”--但我认为wxHaskell (http://wxhaskell.sourceforge.net/download.html)的二进制安装程序会自动安装吗?
我安装了wxHaskell,然后安装了wxPack和wxHaskell。然后阴谋安装了wx和wxcore。我正在运行一些来自Leksah的wx演示,这些演示看上去很不错--但是它们有一些奇怪的错误(我找到了一个所谓的解决方案:“wxhaskell-标签-标签-不能显示-全文”),但是我想尝试一些仅仅来自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发布于 2012-04-09 18:28:43
这似乎是wxHaskell、GHCi和Windows组合的一个已知问题。来自http://www.haskell.org/haskellwiki/WxHaskell/Quick_start
在Windows 7上,ghci会抱怨“无法加载..so/..DLL for: std c++ .”。但是命令行上的
ghc --make Hello.hs; Hello.exe工作得很好。
所以,你可以编译你的代码。你就是不能让它通过解释器。
https://stackoverflow.com/questions/6687254
复制相似问题