在Windows下安装glib时Cabal缺少对外部库的依赖 [英] Cabal missing dependencies on foreign libraries when install glib under Windows
问题描述
我需要glib才能使 threadscope 正常工作.但是我无法使用cabal安装它.我尝试 cabal install glib
,但收到以下错误.我什至尝试下载该库并在本地安装它,但收到相同的错误.
I need glib for threadscope to work. But I am not able to install it using cabal. I tried cabal install glib
but getting the following error. I even tried downloading the library and installing it locally but get the same error.
我在Windows上使用Cygwin.我运行了Cygwin安装程序,以确保我缺少缺少的库.我能够找到glib,gobject但找不到gthread.
I am using Cygwin on Windows. I ran Cygwin setup to make sure I have the missing libraries. I was able to find glib, gobject but not gthread.
Gtk2HsSetup.hs:25:2:
warning: #warning Setup.hs is guessing the version of Cabal. If compilation
of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when buil
ding (prefixed by --ghc-option= when using the 'cabal' command)
[1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist\setup\Gtk2HsSetup.o )
[2 of 2] Compiling Main ( Setup.hs, dist\setup\Main.o )
Linking .\dist\setup\setup.exe ...
Configuring glib-0.12.0...
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: gobject-2.0, gthread-2.0, glib-2.0, intl, iconv
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.
cabal: Error: some packages failed to install:
glib-0.12.0 failed during the configure step. The exception was:
ExitFailure 1
推荐答案
前段时间,我对原始Wiki文章中有关如何安装Gtk2H的内容写了一个小勘误.这是链接 http://progandprog.blogspot.com/2011/04/installing-gtk2hs-012-for-latest.html
Some time ago I've written a small errata to the original wiki article on how to install Gtk2Hs. Here is the link http://progandprog.blogspot.com/2011/04/installing-gtk2hs-012-for-latest.html
我试图在这里描述所有步骤,希望对您有所帮助.
I tried to describe all steps here, and hope it will help you.
所有这些步骤都是通过最新的Gtk2Hs和Haskell平台安装完成的.没有安装Cygwin和MinGW.
All these steps are done with latest Gtk2Hs and Haskell platform installation. Without Cygwin and MinGW being installed.
这篇关于在Windows下安装glib时Cabal缺少对外部库的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!