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