Boost C++ Libraries: Ticket #68: problem with using regex https://svn.boost.org/trac10/ticket/68 <pre class="wiki">I'm trying to use your regex class. I'm using boost_1_27_0 on Solaris compiled with Workshop 6 update 1. The build of the sample site :http://www.boost.org/libs/regex/example/snippets/ regex_match_example.cpp //THE SAMPLE START { #include &lt;stdio.h&gt; #include &lt;boost/regex.hpp&gt; using namespace std; using namespace boost; #define CHAR char void main() { char *format = "(.*)"; regex expression(format, regbase :: normal, a ); } //SAMPLE FINISHED is failed with the following error: $CC -g - I/usr/mwdata/users/olga/boost_1_27_0 /usr/mwdata/users/ olga/boost_1_27_0/libs/regex/build/sunpro/libboost_rege x_mt.so test.C -o test // ERROR START Undefined first referenced symbol in file boost::detail::allocator&lt;unsigned char&gt;::allocator&lt;char&gt;#Nvariant 1(const boost::detail::allocator&lt;__type_1&gt;&amp;) /vobs/studio/serve r/debugger/SunWS_cache/CC_obj_h/hKZggW9H89qzPd1td_2e.o ld: fatal: Symbol referencing errors. No output written to test/test1 // ERROR FINISHED I have found that the problem comming from the expression initialization line: regex expression("^([0-9]+)(\\-| |$)(.*)$"); regex was defined as "typedef reg_expression &lt; CHAR , regex_traits &lt; CHAR &gt; , :: boost :: detail :: allocator &lt; CHAR &gt; &gt; regex" and the problem is in allocator initialization. If I put the only line with allocator initialization into the sample like: //THE SAMPLE START { #include &lt;stdio.h&gt; #include &lt;boost/regex.hpp&gt; using namespace std; using namespace boost; #define CHAR char void main() { char *format = "(.*)"; :: boost :: detail :: allocator &lt; char&gt; a; } //SAMPLE FINISHED the build is failed with the same error. How could I save this problem with 'Undefined symbol'??? </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/68 Trac 1.4.3 nobody Wed, 28 May 2003 11:35:55 GMT <link>https://svn.boost.org/trac10/ticket/68#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/68#comment:1</guid> <description> <pre class="wiki">Logged In: NO It's a known problem with sunpro in debug mode. What happens if you change line 78 of boost/detail/allocator.hpp to: #elif !defined(BOOST_NO_MEMBER_TEMPLATES) &amp;&amp; ! defined(__SUNPRO_CC) ??? John. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 15 Dec 2003 12:59:42 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/68#comment:2 https://svn.boost.org/trac10/ticket/68#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket