How to install cairo on Windows

In life, I can’t understand how to install cairo on Windows!

I need this for Haskell Charts , but when I follow the installation and running instructions:

cabal install gtk 

I get this error:

 Linking dist/setup-wrapper\setup.exe ... Configuring glib-0.12.2... setup.exe: The program pkg-config version >=0.9.0 is required but it could not be found. cabal.exe: Error: some packages failed to install: cairo-0.12.2 failed during the configure step. The exception was: ExitFailure 1 gio-0.12.2 depends on glib-0.12.2 which failed to install. glib-0.12.2 failed during the configure step. The exception was: ExitFailure 1 gtk-0.12.2 depends on glib-0.12.2 which failed to install. pango-0.12.2 depends on glib-0.12.2 which failed to install. 

If I go to the cairo website , they don’t have any setting. Just a bunch of DLLs with which I don't know what to do (how to make Haskell see them).

Any help was appreciated as I tried to fix this damn thing for hours!

+7
source share
4 answers

You need to download the all-in-one package available here . You can open this link yourself by visiting http://www.gtk.org/ and clicking Download, then Windows (32-bit). Extract it to a directory that does not include spaces, and add this directory to your PATH. You will also need cabal install gtk2hs-buildtools before you try cabal install gtk .

These instructions can also be found on the gtk2hs website .

+5
source

I'm not 100% sure, but you might need

cabal install gtk2hs-buildtools

before you can install gtk .

0
source

This is not an answer to the original question, but a comment about an unknown character for cairo-0.12.2

This is probably the error mentioned at http://hackage.haskell.org/trac/gtk2hs/ticket/1211 - Basically, if the element you are building uses Template Haskell, it seems to break.

I hit this problem and was able to work around it by dividing part of my project using Template Haskell into a separate library and allowing the main GUI to invoke the library.

0
source

Since the answers on this page are published, GTK has stopped publishing Windows binaries. A third party compiles an updated dll here: http://www.tarnyko.net/dl/gtk.htm

0
source

Source: https://habr.com/ru/post/909791/


All Articles