Boost C++ Libraries: Ticket #566: Link problem-boost regex https://svn.boost.org/trac10/ticket/566 <pre class="wiki">Hi i have been trying to compile boost programs and i get link error even for the examples that is with in the boost this is the cooman i have used: g++ test.cpp -I /home/mahesh/boost/boost_1_33_1 -L /home/mahesh/boost/boost_1_33_1/libs/regex/build/gcc i Get this undefined ref errors as below: /tmp/ccIjeBwk.o(.gnu.linkonce.t._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::assign(char const*, char const*, unsigned int)]+0x13): In function `boost::basic_regex&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::assign(char const*, char const*, unsigned int)': test.cpp: undefined reference to `boost::basic_regex&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::do_assign(char const*, char const*, unsigned int)' /tmp/ccIjeBwk.o(.gnu.linkonce.t._ZN5boost9re_detail12perl_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;, __ . . . test.cpp: 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;::find()' collect2: ld returned 1 exit status if anyone knows what might have gone wrong please do reply. Regards, RNA </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/566 Trac 1.4.3 John Maddock Sat, 03 Jun 2006 11:34:57 GMT <link>https://svn.boost.org/trac10/ticket/566#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/566#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=14804 You need to add the Boost_regex lib file name on the command line *after* the source file. John Maddock </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 03 Jun 2006 11:34:58 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/566#comment:2 https://svn.boost.org/trac10/ticket/566#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket