I use bjam like so:

bjam toolset=gcc link=static runtime-link=static threading=single \
--with-iostreams --with-filesystem \
-sNO_COMPRESSION=0 -sNO_ZLIB=0 -sZLIB_SOURCE=C:/zlib123 \
--build-type=release install

--------------------------------------------------

But, I do not believe that zlib is being built or linked in to iostreams. The only libs I get in C:/Boost/lib after bjam are these:

libboost_filesystem-mgw34-s.lib
libboost_system-mgw34-s.lib
libboost_iostreams-mgw34-s.lib

However, the output from bjam does not indicate any errors with iostreams or zlib.

--------------------------------------------------

When I try to compile the zlib example from here:

http://www.boost.org/doc/libs/1_37_0/libs/iostreams/doc/classes/zlib.html#examples

I get these errors:

C:/Users/e4m/AppData/Local/Temp/ccSscQ9O.o:zlib_test.cpp:(.text$_ZN5boost9iostreams6detail22zlib_decompressor_implISaIcEED2Ev[boost::iostreams::detail::zlib_decompressor_impl<std::allocator<char> >::~zlib_decompressor_impl()]+0x58): undefined reference to `boost::iostreams::detail::zlib_base::reset(bool, bool)'
C:/Users/e4mAppData/Local/Temp/ccSscQ9O.o:zlib_test.cpp:(.text$_ZN5boost9iostreams6detail22zlib_decompressor_implISaIcEED2Ev[boost::iostreams::detail::zlib_decompressor_impl<std::allocator<char> >::~zlib_decompressor_impl()]+0x6a): undefined reference to `boost::iostreams::detail::zlib_base::~zlib_base()'
...
...
...

--------------------------------------------------

I am trying to compile the example like this:

g++ -static -O3 zlib_test.cpp -o zlib_test.exe -Ic://Boost/include/boost-1_37/ c://Boost/lib/libboost_iostreams-mgw34-s.lib

--------------------------------------------------

Here is the example source code as I have modified it slightly while experimenting:

#include <fstream>
#include <iostream>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/zlib.hpp>
//#include "C:/boost_1_37_0/boost_1_37_0/libs/iostreams/src/zlib.cpp"

#define BOOST_IOSTREAMS_NO_LIB

int main()

{
    using namespace std;
    using namespace boost::iostreams;

    ifstream file("hello.z", ios_base::in | ios_base::binary);
    filtering_streambuf<input> in;
    in.push(zlib_decompressor());
    in.push(file);
    boost::iostreams::copy(in, cout);
   
    return 0;
}

--------------------------------------------------

I've googled a lot for the last week trying to figure out what I'm doing wrong, to no avail... Can someone help me?

Thanks,
e