I am trying to build my C++ project with Boost::iostreams and I get the following linker error:
undefined reference to `boost::iostreams::zlib::deflated'
I checked that my cmake was able to find the boost libraries:
-- Boost version: 1.65.0
-- Found the following Boost libraries:
-- system
-- date_time
-- iostreams
-- regex
and Boost::iostreams is added as a dependency to my project.
What could have cause this?
I installed Boost 1.65 from source using ./bootstrap.sh
command. When I type ./b2
I get the notification that there is no 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)
Is this the cause of this linker error? If so, how can I build boost with zlib enabled?