在Windows上安装GD库

时间:2016-07-07 13:22:12

标签: windows gd haskell-stack

我正在尝试安装gd作为依赖项,但是在未安装的C库上失败。

Configuring gd-3000.7.3...
setup-Simple-Cabal-1.22.5.0-ghc-7.10.3.exe: Missing dependencies on foreign
libraries:
* Missing (or bad) header file: gd.h
* Missing C libraries: gd, png, jpeg, fontconfig, freetype, expat
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.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.

我找到了预先构建的GD for Windows但是我不知道我应该在哪里安装它才能进行注册。

1 个答案:

答案 0 :(得分:0)

新版本的Stack bundle MSYS2提供pacman package manager

首先尝试使用

更新MSYS环境
stack exec -- pacman -Syu

GD本身可以通过

安装
stack exec -- pacman -S mingw-w64-x86_64-gd