文章出處
文章列表
1. 運行命令cabal install glib時出現錯誤:
Cannot find gtk2hsC2hs
Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin).
2. 運行命令cabal install gtk2hs-buildtools
Installed gtk2hs-buildtools-0.12.5.2
3. 重新運行命令cabal install glib,出現新的錯誤:
The program pkg-config version >=0.9.0 is required but it could not be found.
4. 下載/安裝GTK+ all-in-one bundle
a) 下載網址:http://www.gtk.org/download/win32.php,直接下載鏈接:http://win32builder.gnome.org/gtk+-bundle_3.6.4-20130921_win32.zip。
b) 下載后,解壓至一個文件夾,比如F:\GTK,并將該文件夾路徑添加至PATH環境變量中
setx /M PATH "%PATH%;F:\GTK"
5. 重新運行命令cabal install glib,出現新的錯誤:
The pkg-config package glib-2.0 is required but it could not be found.
6. 運行命令pkg-config --modversion glib-2.0,出現錯誤:
ackage glib-2.0 was not 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' found
7. 在F:\GTK中添加glib-2.0.pc文件,文件內容如下:
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 Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
8. 重新運行命令cabal install glib,又出現新的錯誤:
The pkg-config package gobject-2.0 is required but it could not be
found.
在F:\GTK中添加gobject-2.0.pc文件
9. 重新運行命令cabal install glib,又出現新的錯誤:
Missing dependencies on foreign libraries: * Missing C libraries: glib-2.0, gobject-2.0 This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
就研究到這個地方,問題未得到解決。。。
文章列表
全站熱搜
留言列表