【问题标题】:regex-pcre on WindowsWindows 上的正则表达式-pcre
【发布时间】: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 文件夹中找到的文件夹 libinclude 的绝对路径。

标签: haskell cabal


【解决方案1】:

regex-pcre 不支持 Windows,至少当前的 regex-pcre.cabal 在 Windows 上不能正常工作。

试试regex-pcre-builtin,它与regex-pcre 相同,但捆绑了PCRE 源。 不知道作者为什么不把它合并到regex-pcre,而是为此新建一个包。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-20
    • 2014-08-02
    • 1970-01-01
    • 2014-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多