|
Boost : |
From: Tha Project (the_3_project_at_[hidden])
Date: 2002-05-19 22:50:36
I can't seem to be able to compile a test program with
the boost_regex library. I get the following error
message:
--- /tmp/cc9r42Gv.o: In function `boost::reg_expression<char, boost::regex_traits<char>, allocator<char> >::fail(unsigned int)': /tmp/cc9r42Gv.o(.boost::reg_expression<char, boost::regex_traits<char>, allocator<char> >::gnu.linkonce.t.fail(unsigned int)+0x4e): undefined reference to `boost::bad_expression::bad_expression(basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > const &)' /tmp/cc9r42Gv.o: In function `boost::reg_expression<char, boost::regex_traits<char>, allocator<char> >::compile_set_aux(boost::re_detail::jstack<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, allocator<char> > &, boost::re_detail::jstack<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, allocator<char> > &, boost::re_detail::jstack<unsigned int, allocator<char> > &, boost::re_detail::jstack<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, allocator<char> > &, bool, boost::re_detail::_narrow_type const &)': . . . ---- and it keeps going on for awhile. The test program I'm compiling is this: --- te.cc --- #include <iostream> #include <string> #include <boost/regex.hpp> using namespace boost; int main(int argc, char *argv[]) { cmatch what; string str = "XXyX"; regex expression("(\\S\\S){[Ayw]}(\\S)/"); if(regex_match(str,what,expression)) { cout << "what" << endl; } else { cout << "Shit\n"; } return 0; } ---- The command I'm compiling with is: $ gcc -o te te.cc -lboost_regex Thanks! __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk