|
Boost : |
From: Steve Bobrowski (sbobrows_at_[hidden])
Date: 2004-04-27 16:11:11
I got it working once I added /usr/local/lib/libboost_regex-gcc.a to my
project.
Thanks! Steve
"Rene Rivera" <grafik.list_at_[hidden]> wrote in message
news:408EB54A.9040009_at_redshift-software.com...
> Steve Bobrowski wrote:
>
> > Hi,
> >
> > I'm a C++ newbie trying to use the Boost regex libraries. Here's my
> > situation.
> >
> > My system is Red Hat Linux 9, using the Borland C++BuilderX Personal IDE
> > (which uses the g++ compiler).
> >
> > I downloaded and installed Boost from boost.org using the command:
> >
> > bjam -sTOOLS=gcc install
> >
> > The install seemed to complete fine, with 2900+ targets updated.
>
> Good :-)
>
> > The libraries install in /usr/local/include/boost-1_31/boost.
> >
> > I created the following link:
> >
> > ln -s /usr/local/include/boost-1_31/boost /usr/include/boost
>
> Very reasonable thing to do ;-)
>
> > I then use C++BuilderX to try and compile one of the example programs
> > for the regex libaries that I found in the documentation. The source
> > code is:
>
> [cut]
>
> > In function `boost::reg_expression<char, boost::regex_traits<char>,
> > std::allocator<char> > const&
> > boost::re_detail::get_default_expression<char>(char)':
> > "perl_matcher_common.hpp":
> > /usr/include/boost/regex/v4/perl_matcher_common.hpp undefined reference
> > to `boost::reg_expression<char, boost::regex_traits<char>,
> > std::allocator<char> >::reg_expression[in-charge](char const*, unsigned,
> > std::allocator<char> const&)' at line 734
> >
linux/Debug_Build/splittest.o(.gnu.linkonce.t._ZN5boost11regex_splitISt20bac
> > k_insert_iteratorISt4listISsSaISsEEEcSt11char_traitsIcESaIcENS_12reg
> >
ex_traitsIcEES8_EEjT_RSbIT0_T1_T2_ERKNS_14reg_expressionISC_T3_T4_EENS_15reg
> > ex_constants12_match_flagsEj+0x12e):
>
> That would be a link error.
>
> [cut]
>
> > After searching around extensively, I've not come up with any solution
> > to my problem. Can someone please point me in the right direction? It
> > seems like I'm just missing some configuration step along the way.
>
> Since Boost.Regex is not a header only library you need to link to the
> built regex library. The install procedure installed a bunch of these
> built libraries in "/usr/local/lib" for you. Look for libboost_regex*
> files. Depending on what your use requirements are you need to pick one
> of them and tell C++BuilderX to link to it. What the various names mean
> is describe in the Getting Started docs.
>
>
> --
> -- Grafik - Don't Assume Anything
> -- Redshift Software, Inc. - http://redshift-software.com
> -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk