Haskell Windows上的正则表达式pcre
如何在Windows上安装regex pcreHaskell 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
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
的绝对路径。