Problems encountered by Cabal install glib in Haskell

Source: Internet
Author: User
Tags config gtk

1. An error occurred while running the command cabal install glib:

Cannot find GTK2HSC2HS

Please install ' gtk2hs-buildtools ' and check this install directory is in your PATH (e.g. home/.cabal/bin). 2. Run Command cabal install Gtk2hs-buildtools

Installed gtk2hs-buildtools-0.12.5.23. Rerun command cabal install glib, a new error occurred:

The program Pkg-config version >=0.9.0 are required but it could not to be found. 4. Download/install GTK + all-in-one Bundle

A) Download URL: http://www.gtk.org/download/win32.php, direct download link: http://win32builder.gnome.org/gtk+-bundle_3.6.4-20130921_win32.zip.

b After downloading, extract to a folder, such as F:\GTK, and add the folder path to the PATH environment variable

setx/m PATH "%PATH%; F:\GTK "5. Rerun command cabal install glib, a new error occurred:

The Pkg-config package glib-2.0 is required but it could not to be Found.6. An error occurred while running the command pkg-config--modversion glib-2.0:

Ackage glib-2.0 was wasn't found in the Pkg-config search path.

Perhaps you should add the directory containing ' glib-2.0.pc '

To the PKG_CONFIG_PATH environment variable

No package ' glib-2.0 ' Found7. Add the glib-2.0.pc file to the F:\GTK file, which reads as follows:

Prefix=f:\gtk

Exec_prefix=f:\gtk

Libdir=f:\gtk

Includedir=f:\gtk

Glib_genmarshal=glib-genmarshal

Gobject_query=gobject-query

Glib_mkenums=glib-mkenums

Name:glib

Description:c Utility Library

version:2.0

Libs:-l${libdir}-lglib-2.0

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/

Cflags:-i${includedir}/glib-2.0-i${libdir}/glib-2.0/include8. Rerun the command cabal install glib, and a new error occurs:

The Pkg-config package gobject-2.0 is required but it could not being

Found. Add gobject-2.0.pc file in F:\GTK

9. Rerun the command cabal install glib, and a new error occurred:

Missing dependencies on Foreign libraries:

* Missing C libraries:glib-2.0, gobject-2.0

This problem can usually is solved by installing the system packages

Provide these libraries (for your may need the "-dev" versions). If the Libraries

are already installed but in a non-standard location and you can use the

Flags--extra-include-dirs= and--extra-lib-dirs= to specify where they are. The problem has not been solved by studying this place.

Author: cnblogs Dudu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.