[MacPorts] #43650: boost::regex link error
MacPorts
noreply at macports.org
Fri May 9 12:06:29 PDT 2014
#43650: boost::regex link error
----------------------+--------------------------------
Reporter: casmyu@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Keywords: | Port:
----------------------+--------------------------------
Hi there,
I installed boost with MacPorts, most library works perfectly except
boost::regex. Here is the informations from my dev environment:
$ uname -a
Darwin Kernel Version 13.1.0: Wed Apr 2 23:52:02 PDT 2014;
root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64
$ sudo port installed | grep boost
boost @1.55.0_2+no_single+no_static+python27 (active)
here is the source code, quite simple:
$ cat test.cpp
#include <sstream>
#include <iostream>
#include <boost/regex.hpp>
int main (int argc, const char* argv[])
{
boost::regex exp("*");
boost::regex_match("foo", exp);
}
$ g++ --version
g++ (MacPorts gcc48 4.8.2_0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
$ g++ -std=c++11 -o test -I/opt/local/include -L/opt/local/lib
-lboost_regex-mt test.cpp
Undefined symbols for architecture x86_64:
"boost::re_detail::perl_matcher<char const*,
std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&,
boost::regex_constants::_match_flags)", referenced from:
boost::re_detail::perl_matcher<char const*,
std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*,
boost::match_results<char const*, std::allocator<boost::sub_match<char
const*> > >&, boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > > const&,
boost::regex_constants::_match_flags, char const*) in ccRUN4it.o
"boost::re_detail::perl_matcher<char const*,
std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::match()", referenced from:
bool boost::regex_match<char const*,
std::allocator<boost::sub_match<char const*> >, char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*,
char const*, boost::match_results<char const*,
std::allocator<boost::sub_match<char const*> > >&,
boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > > const&,
boost::regex_constants::_match_flags) in ccRUN4it.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Would you please help to check this problem? If you need any more
information, please let me know.
Thank you!
--
Ticket URL: <https://trac.macports.org/ticket/43650>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list