id summary reporter owner description type status milestone component version severity resolution keywords cc 6927 Boost.Program_options can't link with G++'s Profile features bababyt@… Vladimir Prus "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::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::allocator >, std::allocator, std::allocator > > > const&)' /tmp/ccFUvscN.o:(.rodata._ZTVN5boost15program_options11typed_valueIicEE[vtable for boost::program_options::typed_value]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__profile::vector, std::allocator >, std::allocator, std::allocator > > > 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::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::allocator >, std::allocator, std::allocator > > > const&)' /tmp/ccau3LdM.o:(.rodata._ZTVN5boost15program_options11typed_valueIicEE[vtable for boost::program_options::typed_value]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__profile::vector, std::allocator >, std::allocator, std::allocator > > > const&, bool) const' collect2: ld returned 1 exit status }}} " Bugs closed Boost 1.50.0 program_options Boost 1.49.0 Optimization invalid stl profiler