Home > Backend Development > PHP Tutorial > Configure PCRE under windows

Configure PCRE under windows

WBOY
Release: 2016-08-08 09:29:28
Original
1796 people have browsed it
1、配置MSYS环境
1)、简介
 <wbr> <wbr> <wbr> <wbr> Minimal GNU(POSIX)system on Windows,是一个小型的GNU环境,包括基本的bash,make等等。是Windows下最优秀的GNU环境。
2)、安装
 <wbr> <wbr> <wbr> <wbr> 下载 MSYS(jaist.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/msys-1.0.11/MSYS-1.0.11.exe)。按提示进行安装。
2、编译pcre
1)、下载pcre(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/)

2)、将PCRE源码包直接拷贝到MSYS目录下,(如:C:\MSYS\1.0\pcre\)

运行msys.bat启动MSYS,

在命令行输入

cd / <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> // 回根目录

cd pcre  <wbr>  <wbr>  <wbr>  <wbr> <wbr> // 进入PCRE目录

./configure  <wbr>  <wbr> <wbr> // 配置编译

make <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> // 编译全部

完成后,会在C:\MSYS\1.0\pcre\.libs\ 下生成所需要的文件:

libpcre-0.dll // PCRE的动态链接库

libpcre.dll.a // 调用PCRE动态链接库所用的LIB

libpcre.a // PCRE静态链接库

再配合上C:\MSYS\1.0\pcre\目录下的"pcre.h",就可以在程序中加入正则表达式支持了:)</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
Copy after login

以上就介绍了windows下配置pcre,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template