Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8091957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:11:04+00:00 2026-06-05T20:11:04+00:00

I am trying to compile a code that uses Boost’s zlib wrappers. However, no

  • 0

I am trying to compile a code that uses Boost’s zlib wrappers. However, no matter what I do, I can’t get this to work.

In my cpp file, I have the following headers:

#include <algorithm>
#include <fstream>
#include <vector>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_stream.hpp>

I am compiling using command:

g++ -O3 -ffast-math -funroll-loops -ansi -pedantic-errors -L/usr/lib -lboost_filesystem -lboost_serialization -lz -I /usr/include/boost -o zlib_test zlib_test.o

Boost itself was built with bjam after running command:

./bootstrap.sh --prefix=/home/anon/boost --with-libraries=filesystem,program_options,system,serialization

The error message I am getting is the following:

zlib_test.o: In function `boost::detail::sp_counted_impl_p<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >, std::allocator<char> >::impl>::dispose()':
zlib_test.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_9iostreams16symmetric_filterINS2_6detail20zlib_compressor_implISaIcEEES6_E4implEE7disposeEv[boost::detail::sp_counted_impl_p<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_compressor_impl<std::allocator<char> >, std::allocator<char> >::impl>::dispose()]+0x30): undefined reference to `boost::iostreams::detail::zlib_base::reset(bool, bool)'

etc….

Any ideas on how I can get this code to compile? If it matters, this is on a Centos 5 machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:11:05+00:00Added an answer on June 5, 2026 at 8:11 pm

    Ok, I found out the problem. When compiling Boost, I forgot to compile iostreams.

    Thus, the command to build Boost should be:

    ./bootstrap.sh –prefix=/home/andyyen/boost –with-libraries=filesystem,program_options,system,serialization,iostreams

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to compile some code that uses Boost (1.49), with Clang(& libc++)
This is the error I'm getting when trying to compile some code that uses
I'm trying to compile some code that uses the fmemopen function in MinGW. I
I am trying to compile some C++ code that uses threads: #include <iostream> #include
I'm trying to get an app to compile that uses the android-support-v4.jar and the
I am trying to compile code that works on os x and linux using
I am trying to compile a code that has a include directory with some
When trying to compile the following code, I am getting a warning that line
When trying to compile this code: #include <iostream> #include <vector> using namespace std; class
I trying to compile this code: Int64 itag = BitConverter.ToInt64(temp, 0); itag &= 0xFFFFFFFFFFFFFC00;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.