如何建立与Windows的gzip和bzip2支持输入输出流提振 [英] How to build boost iostreams with gzip and bzip2 support on Windows
问题描述
如何建立升压的
输入输出流
库的gzip
和的bzip2
支持?
推荐答案
我不是专家,但是这为我工作。
I am no expert, but this worked for me.
选项1(直接从源)
对于 zlib的和的
下载源文件的.html> bzip2的
。提取下载到的目录,目录移动到某个地方你喜欢。我必须避免 C:\\ Program Files文件(x86)的\\
,因为我无法得到它在目录名称空间的工作,所以我创建 C:\\ SYS \\
,并使用了
Extract the downloads to directories, move directories to somewhere you like. I had to avoid C:\Program Files (x86)\
as I couldn't get it to work with spaces in the directory name, so I created C:\Sys\
and used that.
打开以高特权命令提示符(以管理员身份运行),转到升压
目录,例如 C:\\ Program Files文件(x86)的\\提升\\ boost_1_50_0 \\
键,键入 b2.exe --with-输入输出流-s BZIP2_SOURCE = C:\\ SYS \\ bzip2-1.0.6 -s ZLIB_SOURCE = C:\\ SYS \\的zlib-1.2.7
Open a command prompt with elevated privileges (run as administrator), go to your boost
directory, e.g. C:\Program Files (x86)\boost\boost_1_50_0\
and type b2.exe --with-iostreams -s BZIP2_SOURCE=C:\Sys\bzip2-1.0.6 -s ZLIB_SOURCE=C:\Sys\zlib-1.2.7
确认 C:\\ Program Files文件(x86)的\\提升\\ boost_1_50_0 \\阶段\\ lib中
包含有用的文件,例如 libboost_zlib-VC100 - * - 1_50
和 libboost_bzip2-VC100 - * - 1_50
Verify that C:\Program Files (x86)\boost\boost_1_50_0\stage\lib
contains the wanted files, e.g. libboost_zlib-vc100-*-1_50
and libboost_bzip2-vc100-*-1_50
.
选项2(从源代码编译第一)
-
如上,下载源文件。
As above, download the source files.
打开 Visual Studio命令提示符
以高特权(以管理员身份运行)
Open a Visual Studio Command Prompt
with elevated privileges (run as administrator)
到 C:\\ SYS \\的zlib-1.2.7>
键,键入 NMAKE -f的win32 \\ Makefile.msc
。这将构建的zlib
。
Go to C:\Sys\zlib-1.2.7>
and type nmake -f win32\Makefile.msc
. This will build zlib
.
到 C:\\ SYS \\ bzip2-1.0.6>
键,键入 NMAKE -f makefile.msc
。这将构建 gzip2
。
Go to C:\Sys\bzip2-1.0.6>
and type nmake -f makefile.msc
. This will build gzip2
.
为升压
现在变成了 b2.exe --with-输入输出流-s BZIP2_BINARY = libbz2 -s BZIP2_INCLUDE = C的命令: /Sys/bzip2-1.0.6 -s BZIP2_LIBPATH = C:/Sys/bzip2-1.0.6 -s ZLIB_BINARY = zlib的-s ZLIB_INCLUDE = C:/Sys/zlib-1.2.7 -s ZLIB_LIBPATH = C:/ SYS / zlib的-1.2.7
这篇关于如何建立与Windows的gzip和bzip2支持输入输出流提振的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!