我需要glib以使threadscope正常工作。但我無法使用cabal進行安裝。我試過cabal install glib
,但得到以下錯誤。我甚至嘗試下載庫並在本地安裝,但得到相同的錯誤。Cabal在Windows下安裝glib時缺少對外部庫的依賴關係
我在Windows上使用Cygwin。我運行Cygwin安裝程序以確保我有缺少的庫。我能夠找到glib,gobject但不是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
GLib不是Gtk2HS的組件嗎?如果是這樣,你想按照說明在Windows上安裝Gtk2HS - http://www.haskell.org/haskellwiki/Gtk2Hs。有可能通過Cygwin綁定它,但是如果你嘗試的話,你會非常依賴自己。對於Windows上的FFI綁定,MinGW/MSYS是Unix兼容性的常見解決方案。 –