zlib源码编译
下载源码
http://www.zlib.net/zlib-1.2.11.tar.gz
编辑脚本
set VS=“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat”
set OUT=D:\MyFile\51CTO\libevent\source\out\vs2017_32\zlib
call %VS%
cd zlib-1.2.11
nmake /f win32\Makefile.msc clean
nmake /f win32\Makefile.msc
md %OUT%\lib
md %OUT%\bin
md %OUT%\include
copy /Y *.lib %OUT%\lib
copy /Y *.h %OUT%\include
copy /Y *.dll %OUT%\bin
copy /Y *.exe %OUT%\bin
pause
设置vs2017编译器路径
set VS=“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat”
设置编译完成之后文件的输出路径
set OUT=D:\MyFile\51CTO\libevent\source\out\vs2017_32\zlib
打开编译器
call %VS%
进入zlib源码文件夹
cd zlib-1.2.11
清理编译生成的文件
nmake /f win32\Makefile.msc clean
编译
nmake /f win32\Makefile.msc
创建编译输出文件夹
md %OUT%\lib
md %OUT%\bin
md %OUT%\include
将编译生成的文件以覆盖的方式copy值输出文件夹
copy /Y *.lib %OUT%\lib
copy /Y *.h %OUT%\include
copy /Y *.dll %OUT%\bin
copy /Y *.exe %OUT%\bin