Compiling boost with zlib(使用 zlib 编译 boost)
问题描述
我正在 Windows 7 下用 bjam 编译 boost(64 位应该无关紧要)
I'm compiling boost with bjam under Windows 7 (64bit-should be irrelevant)
D:developmentoostoost_1_44libsiostreamsuild>bjam stage ^
--toolset=msvc-10.0 link=static ^
--build-type=complete ^
-s ZLIB_SOURCE=C:zlib125-dll ^
-s ZLIB_LIBPATH=C:zlib125-dlllib ^
-s ZLIB_INCLUDE=C:zlib125-dllinclude ^
-s ZLIB_BINARY=C:zlib125-dll
但我只得到
stage/libboost_iostreams-vc100-mt-gd-1_44.lib
bin.v2/libs/iostreams/build/msvc-10.0/debug/threading-multi/boost_iostreams-vc100-mt-gd-1_44.dll
bin.v2/libs/iostreams/build/msvc-10.0/debug/threading-multi/boost_iostreams-vc100-mt-gd-1_44.lib
bin.v2/libs/iostreams/build/zlib/msvc-10.0/debug/threading-multi/boost_zlib-vc100-mt-gd-1_44.dll
bin.v2/libs/iostreams/build/zlib/msvc-10.0/debug/threading-multi/boost_zlib-vc100-mt-gd-1_44.lib
但是 stage/libboost_zlib-vc100-mt-gd-1_44.lib 丢失了.
我编译错了吗?
当我尝试运行与 boost 和自编译的 boost/线程库配合良好的项目时,当我包含 boost zlib 内容时,出现以下错误
when I try running my project that worked well with boost and self-compiled boost/thread libraries I get the following error when I include the boost zlib stuff
6>LINK : fatal error LNK1104: cannot open file 'libboost_zlib-vc100-mt-gd-1_44.lib'
有人知道我做错了什么吗?
Does anyone know what I'm doing wrong?
推荐答案
我花了一段时间才让 Boost 在 zlib 支持下正确构建.
It took me a while to get Boost to build correctly with zlib support.
我遇到的问题是在某些时候 zlib 不再包含 gzio.c 源文件.Boost 构建系统 (jamfile.v2) 的 jamfile 引用了导致它失败的 gzio 模块.解决方案是在构建之前删除该引用.
The problem I ran into was that at some point zlib no longer included a gzio.c source file. The jamfile for the Boost build system (jamfile.v2) had a reference to the gzio module which caused it fail. The solution was to remove that reference before building.
我不确定这个答案是否不再相关,除非您正在尝试构建旧版本的 Boost.我相信最初的构建问题已在较新版本的 Boost 中得到修复.
I'm not sure this answer is relevant any longer, unless you're trying to build an old version of Boost. I believe the original build issue has been fixed in more recent versions of Boost.
这篇关于使用 zlib 编译 boost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 zlib 编译 boost
基础教程推荐
- 提升 ASIO 流缓冲 2021-01-01
- 随机插入/删除的综合向量与链表基准 2022-01-01
- 如何在 C++ 中正确使用命名空间? 2022-01-01
- C++:获取传递给函数的多维数组的行大小 2021-01-01
- 与 CAS 的原子交换(使用 gcc 同步内置函数) 2022-01-01
- c++ STL设置差异 2022-01-01
- 将不可复制的闭包对象传递给 std::function 参数 2021-01-01
- 如何更改 SysDateTimePick32 或 CDateTimeCtrl 的背景颜色? 2022-01-01
- 为什么我们不能使用“虚拟继承"?在 COM 中? 2022-01-01
- 如何部分禁用 cmake C/C++ 自定义编译器检查 2021-01-01
