我正在尝试使用Boost :: iostreams构建我的C ++项目,并且出现以下链接器错误:
undefined reference to `boost::iostreams::zlib::deflated'
我检查了我的cmake是否能够找到增强库:
-- Boost version: 1.65.0
-- Found the following Boost libraries:
-- system
-- date_time
-- iostreams
-- regex
和Boost :: iostreams作为依赖项添加到我的项目中。
这可能是什么原因造成的?
我使用./bootstrap.sh
命令从源代码安装了Boost 1.65。当我输入./b2
时,我收到没有zlib的通知:
- zlib : no (cached)
- bzip2 : no (cached)
- lzma : no (cached)
- iconv (libc) : yes (cached)
- icu : no (cached)
- icu (lib64) : no (cached)
- native-atomic-int32-supported : yes (cached)
- native-syslog-supported : yes (cached)
- pthread-supports-robust-mutexes : yes (cached)
- compiler-supports-visibility : yes (cached)
- compiler-supports-ssse3 : yes (cached)
- compiler-supports-avx2 : yes (cached)
- gcc visibility : yes (cached)
- long double support : yes (cached)
这是此链接器错误的原因吗?如果是这样,如何在启用zlib的情况下构建增强功能?