Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell Windows上的正则表达式pcre_Haskell_Cabal - Fatal编程技术网

Haskell Windows上的正则表达式pcre

Haskell Windows上的正则表达式pcre,haskell,cabal,Haskell,Cabal,如何在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

如何在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

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

试试看,它与regex pcre相同,但附带了pcre源。
我不知道作者为什么不将其合并到
regex pcre
,而是为此创建一个新的包。

您需要获得一些提供与perl兼容的windows正则表达式的.dll。请访问www.pcre.org,获取二进制文件(或从源代码处安装),运行cabal install,使用它所说要使用的标志:
--extra include dirs=
--extra lib dirs=
,这应该指向pcre文件夹中找到的文件夹
lib
include
的绝对路径。