I tried compiling John Maddock's example code from the URL I provided below, and I get the error below.  (I run into a similar error with my own code).  Any ideas on how to fix this?  System setting?  FYI, this is the exact code...
<br><br><pre>/*<br> *<br> * Copyright (c) 1998-2002<br> * John Maddock<br> *<br> * Use, modification and distribution are subject to the <br> * Boost Software License, Version 1.0. (See accompanying file <br> * LICENSE_1_0.txt or copy at 
<a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)<br> *<br> */<br><br> /*<br>  *   LOCATION:    see <a href="http://www.boost.org">http://www.boost.org</a> for most recent version.<br>
  *   FILE         partial_regex_match.cpp<br>  *   VERSION      see &lt;boost/version.hpp&gt;<br>  *   DESCRIPTION: regex_match example using partial matches.<br>  */<br><br>#include &lt;string&gt;<br>#include &lt;iostream&gt;
<br>#include &lt;boost/regex.hpp&gt;<br><br>boost::regex e(&quot;(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})&quot;);<br><br>bool is_possible_card_number(const std::string&amp; input)<br>{<br>   //<br>   // return false for partial match, true for full match, or throw for
<br>   // impossible match based on what we have so far...<br>   boost::match_results&lt;std::string::const_iterator&gt; what;<br>   if(0 == boost::regex_match(input, what, e, boost::match_default | boost::match_partial))
<br>   {<br>      // the input so far could not possibly be valid so reject it:<br>      throw std::runtime_error(&quot;Invalid data entered - this could not possibly be a valid card number&quot;);<br>   }<br>   // OK so far so good, but have we finished?
<br>   if(what[0].matched)<br>   {<br>      // excellent, we have a result:<br>      return true;<br>   }<br>   // what we have so far is only a partial match...<br>   return false;<br>}<br><br>int main(int argc, char* argv[])
<br>{<br>   try{<br>      std::string input;<br>      if(argc &gt; 1)<br>         input = argv[1];<br>      else<br>         std::cin &gt;&gt; input;<br>      if(is_possible_card_number(input))<br>      {<br>         std::cout &lt;&lt; &quot;Matched OK...&quot; &lt;&lt; std::endl;
<br>      }<br>      else<br>         std::cout &lt;&lt; &quot;Got a partial match...&quot; &lt;&lt; std::endl;<br>   }<br>   catch(const std::exception&amp; e)<br>   {<br>      std::cout &lt;&lt; e.what() &lt;&lt; std::endl;
<br>   }<br>   return 0;<br>}<br><br><br>and again the error<br><br>&gt; test.cpp : (.text._ZN5boost9re_detail12pe</pre><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
r<br>&gt; l_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC1ES6_S6_RNS_13match_resultsIS6_S9_EERKNS_11basic_regexIcSD_EENS_15regex_constants12_match_flagsES6_[boost::re_detail::perl_matcher&lt;__gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;boost::sub_match&lt;__gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;,
boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt;
&gt;::perl_matcher(__gnu_cxx::__normal_iterator&lt;char const*,
std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt;, __gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt;, boost::match_results&lt;__gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;boost::sub_m<br> atch&lt;__gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt;&amp;,
boost::basic_regex&lt;char, boost::regex_traits&lt;char,
boost::cpp_regex_traits&lt;char&gt; &gt; &gt; const&amp;,
boost::regex_constants::_match_flags, __gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt;)]+0xea): undefined reference to
`boost::re_detail::perl_matcher&lt;__gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;boost::sub_match&lt;__gnu_cxx::__normal_iterator&lt;char
const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;,
std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;,
boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt;
&gt;::construct_init(boost::basic_regex&lt;char,
boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt;
&gt; const&amp;, boost::regex_constants::_match_flags)&#39;</blockquote><br>thanks.<br>mike t.<br><br><div><span class="gmail_quote">On 10/30/07, <b class="gmail_sendername">Michael Linck</b> &lt;<a href="mailto:mgl@absolute-performance.com">
mgl@absolute-performance.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It means that somewhere along the line you handed some template the
<br>wrong type.&nbsp;&nbsp;More cannot really be said with the information you have<br>provided.<br><br>mike<br><br>On Tue, 2007-10-30 at 17:28 -0700, Mike Thornton wrote:<br>&gt; Using g++ on a GNU Ubuntu Linux 7.04 machine, I am unable to compile
<br>&gt; the boost example code (saved as test.cpp) at<br>&gt;<br>&gt; <a href="http://www.boost.org/libs/regex/example/snippets/partial_regex_match.cpp">http://www.boost.org/libs/regex/example/snippets/partial_regex_match.cpp
</a><br>&gt;<br>&gt; Although I can compile my own code which does not use boost, I get a<br>&gt; lot of garbled output from the example code...part of which is listed<br>&gt; below.&nbsp;&nbsp;Any ideas on what is wrong and how to fix it?
<br>&gt;<br>&gt; test.cpp : (.text._ZN5boost9re_detail12per<br>&gt; l_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC1ES6_S6_RNS_13match_resultsIS6_S9_EERKNS_11basic_regexIcSD_EENS_15regex_constants12_match_flagsES6_[boost::re_detail::perl_matcher&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;boost::sub_match&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::perl_matcher(__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, __gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, boost::match_results&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;boost::sub_m
<br> atch&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt;&amp;, boost::basic_regex&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt; const&amp;, boost::regex_constants::_match_flags, __gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;)]+0xea): undefined reference to `boost::re_detail::perl_matcher&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;boost::sub_match&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::construct_init(boost::basic_regex&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt; const&amp;, boost::regex_constants::_match_flags)&#39;
<br>&gt;<br>&gt; Thanks.<br>&gt; Mike<br>&gt; _______________________________________________<br>&gt; Boost-users mailing list<br>&gt; <a href="mailto:Boost-users@lists.boost.org">Boost-users@lists.boost.org</a><br>&gt; <a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users">
http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br><br>_______________________________________________<br>Boost-users mailing list<br><a href="mailto:Boost-users@lists.boost.org">Boost-users@lists.boost.org</a>
<br><a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br></blockquote></div><br>