Gtk2hs windows 7安装

时间:2014-03-07 13:49:47

标签: haskell windows-7 gtk gtk2hs

我做了:

cabal update
cabal install gtk2hs-buildtools

但坚持到这里:

>cabal install gtk
Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( C:\Users\1\AppData\Local\Temp\gtk-0.12.5.4
-4000\gtk-0.12.5.4\SetupWrapper.hs, C:\Users\1\AppData\Local\Temp\gtk-0.12.5.4-4
000\gtk-0.12.5.4\dist\setup\SetupWrapper.o )
[2 of 2] Compiling Main             ( C:\Users\1\AppData\Local\Temp\gtk-0.12.5.4
-4000\gtk-0.12.5.4\Setup.hs, C:\Users\1\AppData\Local\Temp\gtk-0.12.5.4-4000\gtk
-0.12.5.4\dist\setup\Main.o )
Linking C:\Users\1\AppData\Local\Temp\gtk-0.12.5.4-4000\gtk-0.12.5.4\dist\setup\
setup.exe ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist\setup-wrapper\Gtk2HsS
etup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist\setup-wrapper\Main.o )
Linking dist/setup-wrapper\setup.exe ...
Configuring gtk-0.12.5.4...
setup.exe: The pkg-config package gtk+-2.0 is required but it could not be
found.
Failed to install gtk-0.12.5.4
cabal: Error: some packages failed to install:
gtk-0.12.5.4 failed during the configure step. The exception was:
ExitFailure 1

但我在文件夹C:\gtkallinone\bin中有这样的文件:

libgthread-2.0-0.dll

C:\gtkallinone\lib

gthread-2.0.lib
gthread-2.0.def

我在PATH环境中有这条路径: C:\gtkallinone\bin

如何安装?


*的 UPD *

安装gtk-0.12.5.4后,我遇到了缺少m.dll的问题。

我用ghc-pkg uregister卸载了它们。

现在看到更新的答案。

1 个答案:

答案 0 :(得分:0)

我在旧版GTK上做到了所有这一切!

旧版本是2.24.10。

此外,为了解决dll问题并成功构建所有问题,需要安装特定版本的软件包:

>cabal install cairo-0.12.4
>cabal install glib-0.12.4
>cabal install gio-0.12.4
>cabal install pango-0.12.4
>cabal install gtk-0.12.4