Misc Notes

关于windows下编译zlib和libzip

1. 先安装cmake

一路默认

2. 再编译zlib

1
2
3
cmake .. -G"Visual Studio 17 2022" -A"Win32" -DCMAKE_INSTALL_PREFIX="C:/Users/XXX/Codes/zlib/x86"

cmake .. -G"Visual Studio 17 2022" -A"x64" -DCMAKE_INSTALL_PREFIX="C:/Users/XXX/Codes/zlib/x64"

去vs的命令行下编译

1
msbuild /P:Configuration=Release INSTALL.vcxproj

3. 再编译libzip

1
2
3
cmake .. -G"Visual Studio 17 2022" -A"Win32" -DCMAKE_INSTALL_PREFIX="C:/Users/XXX/Codes/libzip/x86" -DZLIB_LIBRARY="C:/Users/XXX/Codes/zlib/x86/lib/zlib.lib" -DZLIB_INCLUDE_DIR="C:/Users/XXX/Codes/zlib/x86/include"

cmake .. -G"Visual Studio 17 2022" -A"x64" -DCMAKE_INSTALL_PREFIX="C:/Users/XXX/Codes/libzip/x64" -DZLIB_LIBRARY="C:/Users/XXX/Codes/zlib/x64/lib/zlib.lib" -DZLIB_INCLUDE_DIR="C:/Users/XXX/Codes/zlib/x64/include"

去vs的命令行下编译

1
msbuild /P:Configuration=Release INSTALL.vcxproj