need help using boost bzip2 filter on Windows (or zlib filter)

Hello all,
I have the following code simple code to compress/uncompress a string:
#include <iostream>
#include

AMDG ChristinaDRS wrote:
I have the following code simple code to compress/uncompress a string: <snip> but I get the following linking error:
1>------ Build started: Project: bzip2_compression_test, Configuration: Debug Win32 ------ 1>Compiling... 1>bzip2_test.cpp 1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'libboost_bzip2-vc90-mt-gd-1_39.lib' 1>Build log was saved at "file://d:\compression\BoostCompression2\Debug\BuildLog.htm" 1>bzip2_compression_test - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
<snip>
Any ideas how I can fix this?
Does the file libboost_bzip2-vc90-mt-gd-1_39.lib exist? Have you set the library path in the IDE? In Christ, Steven Watanabe

Hello Steven,
No that file does not exist. I thought I could just link to my normal bzip2
or zlib library I built myself? I tried setting BOOST_ALL_NO_LIB to 1 so it
would not autolink, but now I get these errors on my zlib test program:
1>------ Build started: Project: libz_compression_test, Configuration: Debug
Win32 ------
1>Linking...
1>zlib_test.obj : error LNK2001: unresolved external symbol "int const
boost::iostreams::zlib::default_compression"
(?default_compression@zlib@iostreams@boost@@3HB)
1>zlib_test.obj : error LNK2001: unresolved external symbol "int const
boost::iostreams::zlib::deflated" (?deflated@zlib@iostreams@boost@@3HB)
1>zlib_test.obj : error LNK2001: unresolved external symbol "int const
boost::iostreams::zlib::default_strategy"
(?default_strategy@zlib@iostreams@boost@@3HB)
1>zlib_test.obj : error LNK2019: unresolved external symbol "protected:
__thiscall boost::iostreams::detail::zlib_base::~zlib_base(void)"
(??1zlib_base@detail@iostreams@boost@@IAE@XZ) referenced in function
__unwindfunclet$??0?$zlib_compressor_impl@V?$allocator@D@std@@@detail@iostreams@boost@@QAE@ABUzlib_params@23@@Z$0
1>zlib_test.obj : error LNK2019: unresolved external symbol "protected:
__thiscall boost::iostreams::detail::zlib_base::zlib_base(void)"
(??0zlib_base@detail@iostreams@boost@@IAE@XZ) referenced in function
"public: __thiscall boost::iostreams::detail::zlib_compressor_impl (struct boost::iostreams::zlib_params const &)"
(??0?$zlib_compressor_impl@V?$allocator@D@std@@@detail@iostreams@boost@@QAE@ABUzlib_params@23@@Z)
1>zlib_test.obj : error LNK2019: unresolved external symbol "protected: void
__thiscall boost::iostreams::detail::zlib_base::reset(bool,bool)"
(?reset@zlib_base@detail@iostreams@boost@@IAEX_N0@Z) referenced in function
"public: __thiscall boost::iostreams::detail::zlib_compressor_impl Steven Watanabe-4 wrote: AMDG ChristinaDRS wrote: I have the following code simple code to compress/uncompress a string:
<snip>
but I get the following linking error: 1>------ Build started: Project: bzip2_compression_test, Configuration:
Debug Win32 ------
1>Compiling...
1>bzip2_test.cpp
1>Linking...
1>LINK : fatal error LNK1104: cannot open file
'libboost_bzip2-vc90-mt-gd-1_39.lib'
1>Build log was saved at
"file://d:\compression\BoostCompression2\Debug\BuildLog.htm"
1>bzip2_compression_test - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
========== <snip> Any ideas how I can fix this? Does the file libboost_bzip2-vc90-mt-gd-1_39.lib exist?
Have you set the library path in the IDE? In Christ,
Steven Watanabe _______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users --
View this message in context: http://www.nabble.com/need-help-using-boost-bzip2-filter-on-Windows-%28or-zl...
Sent from the Boost - Users mailing list archive at Nabble.com.

Hello Christina, On 10/21/2009 10:12 PM, ChristinaDRS wrote:
Hello all,
I have the following code simple code to compress/uncompress a string:
[snip]
1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'libboost_bzip2-vc90-mt-gd-1_39.lib' [snip]
I tried following the instructions on this page:
http://www.boost.org/doc/libs/1_40_0/libs/iostreams/doc/installation.html
so I defined these environment variables:
BZIP2_BINARY = libbz2.lib BZIP2_INCLUDE = D:\bzip2-1.0.5 BZIP2_LIBPATH = D:\bzip2-1.0.5\Debug BZIP2_SOURCE = D:\bzip2-1.0.5
I was also perplexed by those instructions; The variables are boost.build variables, not environmental variables. Please use bjam .... -sBZIP2_SOURCE=D:\bzip2-1.0.5 -sZLIB_SOURCE=... in order to get libboost_bzip2 and libboost_zlib compiled. Cheers, Mikko

Mikko Vainio wrote:
Hello Christina,
On 10/21/2009 10:12 PM, ChristinaDRS wrote:
Hello all,
I have the following code simple code to compress/uncompress a string:
[snip]
1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'libboost_bzip2-vc90-mt-gd-1_39.lib' [snip]
I tried following the instructions on this page:
http://www.boost.org/doc/libs/1_40_0/libs/iostreams/doc/installation.html
so I defined these environment variables:
BZIP2_BINARY = libbz2.lib BZIP2_INCLUDE = D:\bzip2-1.0.5 BZIP2_LIBPATH = D:\bzip2-1.0.5\Debug BZIP2_SOURCE = D:\bzip2-1.0.5
I was also perplexed by those instructions; The variables are boost.build variables, not environmental variables. Please use bjam .... -sBZIP2_SOURCE=D:\bzip2-1.0.5 -sZLIB_SOURCE=... in order to get libboost_bzip2 and libboost_zlib compiled.
Actually, environment variables should work fine. It's not clear from the above report whether the variables were defined when building Boost itself, and whether the libboost_bzip2... library was produced. - Volodya

I actually installed Boost with the BoostPro package. Maybe that doesnt allow me to build those libraries? I did not have those environment variables set at the time however. Thanks, Christina Vladimir Prus-3 wrote:
Mikko Vainio wrote:
Hello Christina,
On 10/21/2009 10:12 PM, ChristinaDRS wrote:
Hello all,
I have the following code simple code to compress/uncompress a string:
[snip]
1>Linking... 1>LINK : fatal error LNK1104: cannot open file 'libboost_bzip2-vc90-mt-gd-1_39.lib' [snip]
I tried following the instructions on this page:
http://www.boost.org/doc/libs/1_40_0/libs/iostreams/doc/installation.html
so I defined these environment variables:
BZIP2_BINARY = libbz2.lib BZIP2_INCLUDE = D:\bzip2-1.0.5 BZIP2_LIBPATH = D:\bzip2-1.0.5\Debug BZIP2_SOURCE = D:\bzip2-1.0.5
I was also perplexed by those instructions; The variables are boost.build variables, not environmental variables. Please use bjam .... -sBZIP2_SOURCE=D:\bzip2-1.0.5 -sZLIB_SOURCE=... in order to get libboost_bzip2 and libboost_zlib compiled.
Actually, environment variables should work fine. It's not clear from the above report whether the variables were defined when building Boost itself, and whether the libboost_bzip2... library was produced.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/need-help-using-boost-bzip2-filter-on-Windows-%28or-zl... Sent from the Boost - Users mailing list archive at Nabble.com.

ChristinaDRS wrote:
I actually installed Boost with the BoostPro package. Maybe that doesnt allow me to build those libraries? I did not have those environment variables set at the time however.
Is libboost_bzip2-vc90-mt-gd-1_39.lib present in whatever directory you have installed to? If not, then: - BoostPro packages do not include those libs, and - setting any environment variables will not help. You probably need to get sources, and build it. - Volodya
participants (4)
-
ChristinaDRS
-
Mikko Vainio
-
Steven Watanabe
-
Vladimir Prus