【发布时间】:2014-02-24 05:37:55
【问题描述】:
如何在 Windows 上安装 regex-pcre?
cabal install regex-pcre
Resolving dependencies...
Configuring regex-pcre-0.94.4...
cabal: Missing dependency on a foreign library:
* Missing C library: pcre
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.
Failed to install regex-pcre-0.94.4
cabal: Error: some packages failed to install:
regex-pcre-0.94.4 failed during the configure step. The exception was:
ExitFailure 1
【问题讨论】:
-
您需要获取一些 .dll 来为 windows 提供 perl-compatible-regex。
-
转到 www.pcre.org,获取二进制文件(或从源代码安装),使用它说要使用的标志运行 cabal install:
--extra-include-dirs=和--extra-lib-dirs=,它们应该指向在 pcre 文件夹中找到的文件夹lib和include的绝对路径。