[Boost-bugs] [Boost C++ Libraries] #7335: Using Boost.Pool requires to link with Boost.System

Subject: [Boost-bugs] [Boost C++ Libraries] #7335: Using Boost.Pool requires to link with Boost.System
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-06 05:16:27


#7335: Using Boost.Pool requires to link with Boost.System
------------------------------------------------+---------------------------
 Reporter: Ivan A. Melnikov <iv@…> | Owner: cnewbold
     Type: Bugs | Status: new
Milestone: Boost 1.52.0 | Component: pool
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: |
------------------------------------------------+---------------------------
 Boost.Pool documentation says:

   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 in fact, in boost 1.51.0 on my system (ALT Linux x86_64) it uses
 Boost.Thread parts which bring Boost.System in, and thus I get the
 following linking error:

 {{{
 $ cat a.cpp

 #include <boost/pool/pool_alloc.hpp>

 int main() { return 0; }

 $ g++ a.cpp
 /tmp/.private/iv/ccqf3pLa.o: In function
 `__static_initialization_and_destruction_0(int, int)':
 a.cpp:(.text+0x4a): undefined reference to
 `boost::system::generic_category()'
 a.cpp:(.text+0x56): undefined reference to
 `boost::system::generic_category()'
 a.cpp:(.text+0x62): undefined reference to
 `boost::system::system_category()'
 collect2: ld returned 1 exit status

 }}}

 Of course, adding -lboost_system helps.

 Not shure if it is Boost.Pool, Boost.Thread or just Boost.Pool
 documentation bug.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7335>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC