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
基础教程推荐
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- CString 到 char* 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
