|
Boost Users : |
Subject: [Boost-users] Newbie Question - Errors if i want to compile
From: Simone Piacco (crazypumpkin10_at_[hidden])
Date: 2012-03-15 09:03:25
Hi everybody.
I'm a new user of boost c++.
I tried to install it on my Mac.
I followed "Getting Started on Unix variant" guide which I found on
boost.org site.
The first part is ok, I tried to compile and execute the simple
example and i had no problem, it runs.
After it I tried to build and install the separately-compiled Boost
libraries, I copied the example in my editor and I typed on terminal:
c++ -I /Users/Simone/Documents/workspace/boost_1_49_0 main.cpp -o
main\ ~/boost/stage/lib/libboost_regex-darwin-mt-d-1_49_0.a
but the result was:
Undefined symbols:
"boost::re_detail::get_mem_block()", referenced from:
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::extend_stack()in ccmv1in1.o
"boost::match_results<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >
>::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > > const&)", referenced from:
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::match_match()in ccmv1in1.o
"boost::re_detail::get_default_error_string(boost::regex_constants::error_type)",
referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type)
constin ccmv1in1.o
boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type)
constin ccmv1in1.o
"boost::re_detail::put_mem_block(void*)", referenced from:
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::unwind_extra_block(bool)in
ccmv1in1.o
"boost::re_detail::raise_runtime_error(std::runtime_error const&)",
referenced from:
void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char,
boost::cpp_regex_traits<char> > >
>(boost::regex_traits_wrapper<boost::regex_traits<char,
boost::cpp_regex_traits<char> > > const&,
boost::regex_constants::error_type)in ccmv1in1.o
"boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::match()", referenced from:
bool boost::regex_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >(__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>, boost::match_results<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > >&, boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&,
boost::regex_constants::_match_flags)in ccmv1in1.o
"boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, 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<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >, boost::regex_traits<char,
boost::cpp_regex_traits<char> >
>::perl_matcher(__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::match_results<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > >&, boost::basic_regex<char,
boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&,
boost::regex_constants::_match_flags,
__gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >)in ccmv1in1.o
"boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char
const*, char const*) const", referenced from:
boost::cpp_regex_traits<char>::transform_primary(char const*,
char const*) constin ccmv1in1.o
"boost::re_detail::cpp_regex_traits_implementation<char>::transform(char
const*, char const*) const", referenced from:
boost::cpp_regex_traits<char>::transform(char const*, char
const*) constin ccmv1in1.o
"boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*,
unsigned int)", referenced from:
boost::basic_regex<char, boost::regex_traits<char,
boost::cpp_regex_traits<char> > >::assign(char const*, char const*,
unsigned int)in ccmv1in1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Even if I used the other way to compile, ("separately specify a
directory to search (with -Ldirectory)"), the result is always the
same.
What can I do??
Thank You
Simone
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