[Boost-bugs] [Boost C++ Libraries] #6927: Boost.Program_options can't link with G++'s Profile features

Subject: [Boost-bugs] [Boost C++ Libraries] #6927: Boost.Program_options can't link with G++'s Profile features
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-22 14:42:59


#6927: Boost.Program_options can't link with G++'s Profile features
-------------------------------+--------------------------------------------
 Reporter: bababyt@… | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: Boost 1.50.0 | Component: program_options
  Version: Boost 1.49.0 | Severity: Optimization
 Keywords: stl profiler |
-------------------------------+--------------------------------------------
 When compiling the Program_options example/first.cpp from tutorial with
 enabled STL profiling with G++ 4.6.3 on Fedora 15 (see
 http://gcc.gnu.org/onlinedocs/libstdc++/manual/profile_mode.html)

 {{{
 g++ first.cpp -lboost_program_options -o first -D_GLIBCXX_PROFILE
 }}}

 it exits with the following error:
 {{{
 /tmp/ccFUvscN.o: In function
 `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int,
 char const* const*)':
 first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x76):
 undefined reference to
 `boost::program_options::detail::cmdline::cmdline(std::__profile::vector<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 std::allocator<std::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > const&)'
 /tmp/ccFUvscN.o:(.rodata._ZTVN5boost15program_options11typed_valueIicEE[vtable
 for boost::program_options::typed_value<int, char>]+0x38): undefined
 reference to
 `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
 std::__profile::vector<std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >, std::allocator<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
 collect2: ld returned 1 exit status
 }}}

 I also tried with -DBOOST_DETAIL_NO_CONTAINER_FWD which helps for the
 other boost libs as described in #6029 but it fails again:
 {{{
 g++ first.cpp -lboost_program_options -o first -D_GLIBCXX_PROFILE
 -DBOOST_DETAIL_NO_CONTAINER_FWD
 }}}

 error:
 {{{
 /tmp/ccau3LdM.o: In function
 `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int,
 char const* const*)':
 first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x76):
 undefined reference to
 `boost::program_options::detail::cmdline::cmdline(std::__profile::vector<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >,
 std::allocator<std::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > const&)'
 /tmp/ccau3LdM.o:(.rodata._ZTVN5boost15program_options11typed_valueIicEE[vtable
 for boost::program_options::typed_value<int, char>]+0x38): undefined
 reference to
 `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
 std::__profile::vector<std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >, std::allocator<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
 collect2: ld returned 1 exit status
 }}}

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