【问题标题】:Cant install glib on Windows when trying to install gtk3 using cabal尝试使用 cabal 安装 gtk3 时无法在 Windows 上安装 glib
【发布时间】:2017-05-29 21:27:12
【问题描述】:

我一直在尝试使用 cabal 安装 gtk3,按照 https://wiki.haskell.org/Gtk2Hs/Installation 上的说明进行操作,但我已将 gtk 替换为 gtk3,我在一个 gtk 3.6.4 捆绑包中下载了所有内容(来自:http://www.tarnyko.net/dl/gtk.htm)解压缩它并将 location_of_files/bin 添加到我的路径中,运行 pkg-config --cflags gtk+-3.0 工作正常,cabal install gtk2hs-buildtools 正确安装,但 cabal install gtk3 停止:

Resolving dependencies...
Configuring glib-0.13.4.1...
Failed to install glib-0.13.4.1
Build log ( C:\Users\User\AppData\Roaming\cabal\logs\glib-0.13.4.1.log ):
cabal: Entering directory 'C:\Users\User\AppData\Local\Temp\cabal-tmp-6472\glib-0.13.4.1'
[1 of 1] Compiling Main             ( C:\Users\User\AppData\Local\Temp\cabal-tmp-6472\glib-0.13.4.1\dist\setup\setup.hs, C:\Users\User\AppData\Local\Temp\cabal-tmp-6472\glib-0.13.4.1\dist\setup\Main.o )
Linking C:\Users\User\AppData\Local\Temp\cabal-tmp-6472\glib-0.13.4.1\dist\setup\setup.exe ...
Configuring glib-0.13.4.1...
setup.exe: Missing dependency on a foreign library:
* Missing C library: intl
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Leaving directory 'C:\Users\User\AppData\Local\Temp\cabal-tmp-6472\glib-0.13.4.1'

我下载的 gtk 包在 include 文件夹中有一个 libintl.h 文件,在 bin 文件夹中有一个 dll,我尝试将文件放在我能想到的几乎所有位置,但无济于事,我想不出其他任何东西。

更多详细信息:我正在运行带有 haskell-platform 8.0.2 x64 的 windows 7 x64,我真的需要在 windows 下运行我正在工作的项目。

【问题讨论】:

标签: haskell gtk cabal cabal-install haskell-platform


【解决方案1】:

我设法按照https://www.gtk.org/download/windows.php 中的说明安装 gtk,安装 MSYS2 并使用 pacman 安装 gtk 库,只忽略第 4 步。安装库后,我添加到路径 C:\msys64\mingw64\bin,和cabal 终于编译了gtk3。 我不喜欢这个解决方案,因为它在我的电脑上又安装了一个 mingw。

【讨论】:

  • 我认为您可以重新使用现有的 MSYS2 安装并仅安装缺少的软件包。
猜你喜欢
  • 2017-10-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-01-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多