getpcre.cmd:
goto START
首先确保控制台环境中有:
1、VC6命令行编译环境
2、wget.exe、unzip.exe、sed.exe、mv.exe
然后执行这个批处理文件,就可以得到VC版本的pcr.lib。
:START
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.7.zip
unzip pcre-7.7.zip
cd pcre-7.7
sed -e "s/#define HAVE_BCOPY 1/#define HAVE_BCOPY 0/g" config.h.generic > config.h
mv pcre.h.generic pcre.h
mv pcre_chartables.c.dist pcre_chartables.c
mv pcre_chartables.c.dist pcre_chartables.c
cl -MD -DHAVE_CONFIG_H dftables.c
dftables.exe pcre_chartables.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_chartables.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_compile.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_config.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_dfa_exec.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_exec.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_fullinfo.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_get.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_globals.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_info.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_maketables.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_newline.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_ord2utf8.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_refcount.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_study.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_tables.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_try_flipped.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_ucp_searchfuncs.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_valid_utf8.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_version.c
cl -O1 -MD -DHAVE_CONFIG_H -c pcre_xclass.c
lib -out:libpcr.lib pcre_chartables.obj pcre_compile.obj pcre_config.obj pcre_dfa_exec.obj pcre_exec.obj pcre_fullinfo.obj pcre_get.obj pcre_globals.obj pcre_info.obj pcre_maketables.obj pcre_newline.obj pcre_ord2utf8.obj pcre_refcount.obj pcre_study.obj pcre_tables.obj pcre_try_flipped.obj pcre_ucp_searchfuncs.obj pcre_valid_utf8.obj pcre_version.obj pcre_xclass.obj |
|