bz2 & gzip support - ld can't find symboles
Hi, I try to use the bz2 and gzip iostreams from Boost 1.43 on my OSX Snow Leopard. The code is compiled without any errors, but the ld returns: Undefined symbols: "boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)", referenced from: boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >::zlib_compressor_impl(boost::iostreams::zlib_params const&)in ncd.o [...] I had setup the -l G++ option to "z" and "bz2" but I can't link my code. I had compiled the Boost from sources with bjam -sHAVE_ICU=1 -sZLIB_BINARY -sBZIP2_BINARY --with-mpi toolset=darwin install --prefix= Binaries for the zip algorithms are under /usr/lib After compiling with bjam I get 4 libs: libbost_mpi.dylib, libbost_serialization.dylib and both as *.a files. Do I have forget anything on compile / link option? I had found an articel for Windows in which bjam should create some boost zip libraries. I try the example on http://www.boost.org/doc/libs/1_43_0/libs/iostreams/doc/classes/zlib.html#in... but it run into errors. Thanks for help Phil
Kraus Philipp wrote:
Hi,
I try to use the bz2 and gzip iostreams from Boost 1.43 on my OSX Snow Leopard. The code is compiled without any errors, but the ld returns:
Undefined symbols: "boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)", referenced from: boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >::zlib_compressor_impl(boost::iostreams::zlib_params const&)in ncd.o [...]
Did you link with -lboost_iostreams? Regards, Roland
On 2010-06-10 16:58:44 +0200, Roland Bock said:
Kraus Philipp wrote:
Hi,
I try to use the bz2 and gzip iostreams from Boost 1.43 on my OSX Snow Leopard. The code is compiled without any errors, but the ld returns:
Undefined symbols: "boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)", referenced from: boost::iostreams::detail::zlib_compressor_impl<std::allocator<char>
::zlib_compressor_impl(boost::iostreams::zlib_params const&)in ncd.o [...]
Did you link with -lboost_iostreams?
I had recompiled Boost and now it works. Thx Phil
participants (3)
-
Kraus Philipp
-
Philipp Kraus
-
Roland Bock