1

我克隆reactive-banana并尝试构建reactive-banana-wx示例:

git clone http://github.com/HeinrichApfelmus/reactive-banana.git 
cd reactive-banana/reactive-banana-wx
stack build

该目录中有一个stack.yaml,它确实获取了几个包,但由于以下错误而停止:

Progress: 16/20
--  While building package wxc-0.92.2.0 using:

[snip]

    Process exited with code: ExitFailure 1
    Logs have been written to: /home/kostmo/github/reactive-banana/reactive-banana-wx/.stack-work/logs/wxc-0.92.2.0.log

    [1 of 1] Compiling Main             ( /tmp/stack5908/wxc-0.92.2.0/Setup.hs, /tmp/stack5908/wxc-0.92.2.0/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/Main.o )
    Linking /tmp/stack5908/wxc-0.92.2.0/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup ...
    Error: wx-config not found, please install wx-config before installing wxc

在运行之前是否必须执行其他步骤stack build

这个用户似乎有一个相关的问题。

4

2 回答 2

1

@Heinrich 的回答让我走上了正轨。

我按照这里的指示做了一些细微的改动。

在我的 Ubuntu 15.10 机器上,我执行了以下命令:

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc

# This seems to work even though my release's codename is "wily":
sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/ubuntu/ utopic universe'

sudo apt-get update
sudo apt-get install g++ libglu-dev libwxgtk3.0-dev libwxbase3.0-0-unofficial libwxbase3.0-dev libwxgtk3.0-0-unofficial wx3.0-headers wx-common libwxgtk-media3.0-dev libwxgtk-webview3.0-dev

我不确定这些软件包中的每一个都是必要的,但是在安装它们之后我能够执行

stack build

reactive-banana/reactive-banana-wx目录中成功。

我无法立即运行这些示例;reactive-banana-wx.cabal我首先在下面更改flag buildExamples了行

default:     False

default:     True

重新运行stack build然后编译示例,可以按如下方式运行:

stack exec Counter
于 2016-04-03T06:09:24.253 回答
1

错误消息说

Error: wx-config not found, please install wx-config before installing wxc

此错误表明您运行的程序找不到wx-config实用程序,它是 wxWidgets 安装的一部分。一个可能的原因是您没有安装 wxWidgets 库,它是用 C++ 编写的。

于 2016-04-02T08:52:58.127 回答