2016-07-07 351 views
0

我试图安装gd作为依赖项,但是它在未安装C库时失败。在Windows上安装GD Library

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但是我不知道我应该在哪里安装它为它注册。

回答

0

较新版本的堆栈MSYS2它提供了pacman package manager

首先尝试使用

stack exec -- pacman -Syu 

GD本身可以通过

stack exec -- pacman -S mingw-w64-x86_64-gd 
+0

由于安装[/ U/Reddit上特洪(https://www.reddit.com/更新MSYS环境r/haskellgamedev/comments/4jpthu/windows_sdl2_is_now_almost_painless_via_stack /)。 –