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

  • SEARCH
  • Home
  • 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 7879547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:55:10+00:00 2026-06-03T03:55:10+00:00

The Boost.Pool documentation says that (emphasis mine): The Boost Pool library is a header-only

  • 0

The Boost.Pool documentation says that (emphasis mine):

The Boost Pool library is a header-only library. That means there is
no .lib, .dll, or .so to build; just add the Boost directory to your
compiler’s include file path, and you should be good to go!

But when I try to compile code like this in VS2010 SP1:

#include <string>
#include <vector>

#include <boost\pool\pool_alloc.hpp>

int main()
{
    typedef std::basic_string<wchar_t, std::char_traits<wchar_t>, 
        boost::pool_allocator<wchar_t>> PoolString;

    std::vector<PoolString> vec;
    for (int i = 0; i < 100; i++)
    {
        PoolString s(L"Some test string. ABCDEF.");
        vec.push_back(s);
    }

    // Release pool memory
    boost::singleton_pool<boost::pool_allocator_tag, sizeof(wchar_t)>::release_memory();

    return 0;
}

I got a linker error:

error LNK1104: cannot open file
‘libboost_thread-vc100-mt-gd-1_49.lib’

Is Boost.Pool documentation incorrect?
What am I missing here?
How can I use Boost.Pool?

  • 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-03T03:55:11+00:00Added an answer on June 3, 2026 at 3:55 am

    The boost::singleton_pool is using a default mutex implementation that is located in boost::thread, which is not header only.

    See the singleton_pool header quoted below for information on how to remove the dependency:

    Mutex This class is the type of mutex to use to protect
    simultaneous access to the underlying Pool. Can be any Boost.Thread
    Mutex type or boost::details::pool::null_mutex. It is
    exposed so that users may declare some singleton pools normally (i.e.,
    with synchronization), but some singleton pools without
    synchronization (by specifying
    boost::details::pool::null_mutex) for efficiency reasons.
    The member typedef mutex exposes the value of this template
    parameter. The default for this parameter is
    boost::details::pool::default_mutex which is a synonym for either
    boost::details::pool::null_mutex (when threading support is
    turned off in the compiler (so BOOST_HAS_THREADS is not set), or
    threading support has ben explicitly disabled with
    BOOST_DISABLE_THREADS (Boost-wide disabling of threads) or
    BOOST_POOL_NO_MT (this library only)) or for boost::mutex
    (when threading support is enabled in the compiler).

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

Sidebar

Related Questions

I am using boost::pool . It only has header file, no dll or o
I have a thread pool that is using shared mutexes from the boost library.
Boost is meant to be the standard non-standard C++ library that every C++ user
Declaring boost::poor is something that goes as below. boost::pool<> Obj(); I am curious how
What is the differance between boost::details::pool::pthread_mutex and boost::details::pool::null_mutex . I see that in latest
The boost documentation says: Returns: false if the call is returning because the time
I'm thinking of using boost::weak_ptr to implement a pool of objects such that they
all, If you use boost pool library, how would you replace the following statement:
I've played with boost::pool a few times in places where it seemed to me
I'm just experimenting with boost::pool to see if its a faster allocator for stuff

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.