Building iostreams with zlib support on Windows XP in mingw-msys

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#ex...
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 ::~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 --------------------------------------------------
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

AMDG e m wrote:
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
Leave out -sNO_ZLIB=0. The build actually only checks for the presence vs. absence of NO_ZLIB so defining it at all will disable zlib. In Christ, Steven Watanabe

Thanks a lot! That worked.
On Sat, Jan 17, 2009 at 10:22 PM, Steven Watanabe
The build actually only checks for the presence vs. absence of NO_ZLIB so defining it at all will disable zlib.

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
1. you need to have zlib build before you build boost 2. you need to remove -sNO-ZLIB=0 and you need to define 2 variables: -sZLIB_INCLUDE=path to zilb include directory -sZLIB_LIBPATH=path to zlib lib directory Frédéric Bron Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
participants (3)
-
e m
-
frederic.bron@alcan.com
-
Steven Watanabe