1

我在 Ubuntu 13.10 上并尝试安装 wxHaskell。我从存储库安装了 wxWidgets 2.9 http://repos.codelite.org/wx3.0/ubuntu/

基本cabal install wx让我

src/cpp/eljgrid.cpp:61:65: error: no matching function for call to ‘wxGridCellEditor::PaintBackground(wxRect, wxGridCellAttr*)’
  self->PaintBackground(wxRect(x, y, w, h), (wxGridCellAttr*)attr);
                                                                 ^
[...]
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install.

从 GitHub 存储库下载并从源代码构建让我:

setup: can't find source for Graphics/UI/WXCore/WxcClassInfo in src/haskell,
dist/build/autogen
Failed to install wxcore-0.90.1.0
cabal: Error: some packages failed to install:
wxcore-0.90.1.0 failed during the building phase. The exception was:
ExitFailure 1
Resolving dependencies...
Configuring wx-0.90.1.0...
cabal: At least the following dependencies are missing:
wxcore >=0.90.1.0
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: wx-0.90.1.0
trying: wx-0.90.1.0:+splitbase
rejecting: wxcore-0.90.0.3, 0.90.0.1, 0.90, 0.13.2.3, 0.13.2.1, 0.13.2,
0.12.1.7, 0.12.1.6, 0.12.1.5, 0.12.1.4, 0.12.1.3, 0.12.1.2, 0.12.1.1,
0.11.1.2, 0.11.1.1, 0.11.1.0, 0.11.0, 0.10.13.0, 0.10.13, 0.10.12, 0.10.11,
0.10.10, 0.10.9, 0.10.8, 0.10.7, 0.10.6, 0.10.5, 0.10.4, 0.10.3, 0.10.2,
0.10.1 (conflict: wx-0.90.1.0:splitbase => wxcore>=0.90.1.0)

这是怎么回事,需要什么来解决它?

4

2 回答 2

1

听起来你已经克隆了 wxHaskell 的 github 副本:

git clone https://github.com/wxHaskell/wxHaskell

然后,您尝试安装 wxHaskell,而无需先安装其任何构建依赖项。注意你的错误信息:

cabal: At least the following dependencies are missing:
wxcore >=0.90.1.0

那个版本的 wxcore 还没有被破解,但它在你刚刚克隆的 repo 中(参见https://github.com/wxHaskell/wxHaskell/blob/master/wxcore/wxcore.cabal)。因此,首先转到wxcore目录并 cabal 安装该库。

编辑:注意依赖树更深。您需要先安装几个wx*软件包。

于 2014-02-14T20:43:28.453 回答
1

我知道这是一篇旧文章,但我花了一段时间安装 wxHaskell(在 Linux 上),因此值得分享。https://wiki.haskell.org/WxHaskell/Linux给出的说明需要更新。

第一的:

sudo apt-get install libglu1-mesa-dev
sudo apt-get install libwxgtk3.0-dev
sudo apt-get install libwxgtk-media3.0-dev

然后(cabal sandbox init如果你使用沙盒之后):

cabal install wxdirect
cabal install wxc
cabal install wxcore
cabal install wx
于 2016-09-03T17:05:26.997 回答