Subject: [Boost-bugs] [Boost C++ Libraries] #3243: Linking errors with GCC parallel mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-04 17:56:59
#3243: Linking errors with GCC parallel mode
------------------------------------------------+---------------------------
Reporter: Dmitriy Morozov <boost@â¦> | Owner:
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: None
Version: Boost 1.37.0 | Severity: Problem
Keywords: |
------------------------------------------------+---------------------------
The errors below refer to GCC 4.4, Boost 1.37 running on Linux.
When I try to compile the simplest code that needs to link against Boost
libraries with GCC using OpenMP and GCC's parallel mode, I get linking
errors. The -D_GLIBCXX_PARALLEL below is key (the problem goes away
without it).
Is this a known problem, and are there any fixes? The problem is not
specific to program_options, I get similar errors with the serialization
library.
For example:
g++ -O3 witnessed.cpp -o witnessed-openmp -fopenmp -D_GLIBCXX_PARALLEL
-lboost_program_options
results in
/tmp/ccXSqtpc.o: In function
`boost::program_options::typed_value<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&,
std::__cxx1998::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&) const':
witnessed.cpp:(.text._ZNK5boost15program_options11typed_valueISscE6xparseERNS_3anyERKNSt9__cxx19986vectorISsSaISsEEE[boost::program_options::typed_value<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&,
std::__cxx1998::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&) const]+0x19):
undefined reference to `boost::program_options::validate(boost::any&,
std::__cxx1998::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&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >*,
int)'
/tmp/ccXSqtpc.o: In function
`boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int,
char**)':
witnessed.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC1EiPPc[boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int,
char**)]+0x50): undefined reference to
`boost::program_options::detail::cmdline::cmdline(std::__cxx1998::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/ccXSqtpc.o:(.rodata._ZTVN5boost15program_options11typed_valueISscEE[vtable
for boost::program_options::typed_value<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, char>]+0x30): undefined
reference to
`boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
std::__cxx1998::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
make: *** [witnessed-openmp] Error 1
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3243> 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:00 UTC