我做了:
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
卸载了它们。
现在看到更新的答案。
答案 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