Gtk2hs windows 7 installation

2019-01-26 22:54发布

问题:

I did:

cabal update
cabal install gtk2hs-buildtools

But stuck here:

>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

But I have such files in folders C:\gtkallinone\bin:

libgthread-2.0-0.dll

And C:\gtkallinone\lib:

gthread-2.0.lib
gthread-2.0.def

I have this path in PATH environment: C:\gtkallinone\bin

How to install it?


*UPD*

After installing gtk-0.12.5.4 I encountered the problem of lack m.dll.

I uninstalled them with ghc-pkg uregister.

Now see th updated answer.

回答1:

I did it on old version of GTK all in one bundle!

The old version is 2.24.10.

Also, for solving problem's with dll and succesfully build all, one need to install specific versions of packages:

>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