[Boost-bugs] [Boost C++ Libraries] #7347: BOOST_ERROR_CODE_HEADER_ONLY

Subject: [Boost-bugs] [Boost C++ Libraries] #7347: BOOST_ERROR_CODE_HEADER_ONLY
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-08 15:44:57


#7347: BOOST_ERROR_CODE_HEADER_ONLY
------------------------------+---------------------------------------------
 Reporter: viboes | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: system
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 Even if BOOST_ERROR_CODE_HEADER_ONLY is not documented I wanted to report
 this defect.

 When I define BOOST_ERROR_CODE_HEADER_ONLY building Boost.Thread I get the
 following error:


 {{{
 ld: duplicate symbol boost::system::system_category() in
 ../../../bin.v2/libs/thread/build/darwin-4.2.1/debug/threading-
 multi/future.o and ../../../bin.v2/libs/thread/build/darwin-4.2.1/debug
 /threading-multi/pthread/thread.o for architecture x86_64
 collect2: ld returned 1 exit status

     "g++" -dynamiclib -Wl,-single_module -install_name
 "libboost_thread.dylib" -o
 "../../../bin.v2/libs/thread/build/darwin-4.2.1/debug/threading-
 multi/libboost_thread.dylib"
 "../../../bin.v2/libs/thread/build/darwin-4.2.1/debug/threading-
 multi/pthread/thread.o"
 "../../../bin.v2/libs/thread/build/darwin-4.2.1/debug/threading-
 multi/pthread/once.o"
 "../../../bin.v2/libs/thread/build/darwin-4.2.1/debug/threading-
 multi/future.o" -headerpad_max_install_names -g
 }}}


 I guess that you need to declare the following functions inline.


 {{{
     BOOST_SYSTEM_DECL const error_category & system_category();
     BOOST_SYSTEM_DECL const error_category & generic_category();
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7347>
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