haskell - 运行 wxHaskell (Windows) 的问题

标签 haskell wxhaskell

该页面:(http://en.wikibooks.org/wiki/Haskell/GUI)描述了要运行 wx 代码,可以安装 wx,然后必须“向 GHC 注册 wxHaskell” - 但我认为 wxHaskell 的二进制安装程序(http://wxhaskell.sourceforge.net/download.html)会自动吗?

我安装了 wx-config,然后安装了 wxPack 和 wxHaskell。然后 cabal 安装了 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

最佳答案

这似乎是 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.



所以,你可以编译你的代码。您只是无法通过解释器运行它。

关于haskell - 运行 wxHaskell (Windows) 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6687254/

相关文章:

list - 删除列表中第二次出现的元素 - Haskell

haskell - Haskell:如何检测 “lazy memory leaks”

c++ - 有没有人尝试在 C++ 中实现类似 Haskell 的 case-of 语句?

Haskell 递归函数中的无限循环

haskell - 如何重新分发 wxHaskell 应用程序?

haskell - 无法运行在 GHCI 中运行的我的 wxHaskell 程序

list - 使用 Haskell 的 map 函数计算列表的总和

haskell - wxHaskell死了吗?

haskell - wxhaskell异步更新

haskell - 像命令式程序一样跟踪 Haskell 中的程序变量