2016-04-02 28 views
1

我克隆reactive-banana,並試圖建立reactive-banana-wx例如:我應該能夠單獨使用「堆疊構建」來編譯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

This user似乎有一個相關的問題。

回答

1

錯誤消息說

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

這個錯誤提示你運行該程序無法找到wx-config工具,它是wxWidgets的安裝的一部分。一個可能的原因是你沒有安裝用C++編寫的wxWidgets庫。

1

@海因裏希的回答讓我走上了正軌。

我按照方向here稍作了一些改動。

在我的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 
相關問題