|
Boost Users : |
Subject: [Boost-users] Linker error when using Boot regex on AIX
From: Jyoti Sharma (jyoti.mickey_at_[hidden])
Date: 2017-09-15 10:10:25
I am using boost_1_61_0. In my code I have:
#include <boost/regex.hpp>
static boost::regex testxp("[");
I have these libraries:
libboost_regex.a libboost_regex.so
I can see these libraries have symbols:
LIBRARY: Shared object libboost_regex.so: 136 symbols imported.
LIBRARY: Shared object libboost_system.so: 7 symbols imported.
To build my program I have added these linking options:
-Wl,-bnoquiet -Wl,-Bstatic -lboost_regex -lboost_system -Wl,-Bdynamic
But I get this error during linking:
ld: 0711-317 ERROR: Undefined symbol: .boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char
const*, char const*, unsigned int)
But that symbol is there:
machine:/home> nm libboost_regex.so nm libboost_regex.so |grep do_assign
._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE9do_assignEPKcS7_j
T 268508592
machine:/home> c++filt
._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE9do_assignEPKcS7_j
.boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*,
unsigned int)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net