Boost logo

Boost Users :

From: hallouina-ml_at_[hidden]
Date: 2007-11-13 10:27:06


--- John Maddock <john_at_[hidden]> a écrit :

> hallouina-ml_at_[hidden] wrote:
> > Hello everybody,
> >
> > I begin with C++ and need to use some regex in my program. So I try
> to
> > compile this example from the boost website :
> >
> >
> http://www.boost.org/libs/regex/example/snippets/captures_example.cpp
> >
> > but I get this error :
> >
> > ~/developpement/essai_regex/boost$ g++ -o test
> captures_examples.cpp
>
> There are two issues here: in order to use that specific feature you
> need to
> compile both your code and the regex library with
> BOOST_REGEX_MATCH_EXTRA
> defined (this isn't the case for any of the other examples). You
> also need
> to specify the regex library to link against, so usually:
>
> g++ -o test -DBOOST_REGEX_MATCH_EXTRA=1 captures_examples.cpp
> -lboost_regex
>
> See the "repeated captures" section of the docs
>
http://svn.boost.org/svn/boost/trunk/libs/regex/doc/html/boost_regex/captures.html#boost_regex.captures.repeated_captures
>
> for more information on this still-experimental repeated-capture
> feature.
>
> Also note that you *do not* need to turn this feature on to be able
> to use
> regular Perl or POSIX style captures.
>
> HTH, John.
>

I need Perl style capture like m/(some_regex)/g

because I need the g flag (to capture more than one time my regex). So
if I understand the documentation (as you can see, my english is far
from beeing perfect...) ; if I want to use the g flag equivalent in my
regex, I need to enable this feature.

So as the documentation said, I uncomment in the user.hpp the
DBOOST_REGEX_MATCH_EXTRA option and recompile it.

In fact I just compile it for the first time because before I was using
the boost library that was supplied by my ubuntu package.

Now I get this error :

...failed updating 224 targets...
...skipped 64 targets...
...updated 4562 targets...
Not all Boost libraries built properly.

Why I get this error? will my boost::regex library work even if I get
this error?

Thanks again.

      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net