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


基础教程推荐
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 我有静态或动态 boost 库吗? 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 常量变量在标题中不起作用 2021-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 这个宏可以转换成函数吗? 2022-01-01
- 在 C++ 中计算滚动/移动平均值 2021-01-01