如何使用gzip
和bzip2
支持构建boost
的iostreams
库?
I am no expert, but this worked for me.
Option 1 (straight from source)
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.
Open a command prompt with elevated privileges (run as administrator), go to your boost
directory, eg 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
Verify that C:\\Program Files (x86)\\boost\\boost_1_50_0\\stage\\lib
contains the wanted files, eg libboost_zlib-vc100-*-1_50
and libboost_bzip2-vc100-*-1_50
.
Option 2 (build from source first)
As above, download the source files.
Open a Visual Studio Command Prompt
with elevated privileges (run as administrator)
Go to C:\\Sys\\zlib-1.2.7>
and type nmake -f win32\\Makefile.msc
. This will build zlib
.
Go to C:\\Sys\\bzip2-1.0.6>
and type nmake -f makefile.msc
. This will build gzip2
.
The command for boost
now becomes b2.exe --with-iostreams -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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.