Boost logo

Boost :

From: Chau Johnthan (chaujohnthan_at_[hidden])
Date: 2004-09-08 14:17:06


Hi, Eric:

> 1) Discussion about GRETA is off-topic here becuase it is not a part of
> Boost and never will be.

so the boost lib will not be compatible with GRETA?

> 2) I am no longer the maintainer of GRETA. Presumably you downloaded it
> from GRETA's website, where it says who the new maintainers are.

yes, i know that, but i want to use GRETA inwith boost.

> And even though you have given virtually no specific information about
> your problem, I can probably guess that it's because you didn't add
> GRETA's cpp files to your project.

I just created a win32 project, and replace _tmian with the supplied sample
in the early start of the document.
#include <iostream>
#include <string>
#include "regexpr2.h"
using namespace std;
using namespace regex;

int main() {
    match_results results;
    string str( "The book cost $12.34" );
    rpattern pat( "\\$(\\d+)(\\.(\\d\\d))?" );
    // Match a dollar sign followed by one or more digits,
    // optionally followed by a period and two more digits.
    // The double-escapes are necessary to satisfy the compiler.

    match_results::backref_type br = pat.match( str, results );
    if( br.matched ) {
        cout << "match success!" << endl;
        cout << "price: " << br << endl;
    } else {
        cout << "match failed!" << endl;
    }
    return 0;
}

and I added regexp2.cpp & regexp2.h only.

------ Build started: Project: testreg, Configuration: Debug Win32 ------
Compiling...
stdafx.cpp
Compiling...
regexpr2.cpp
e:\testreg\regexpr2.cpp(59) : warning C4005: 'REGEXPR_H_INLINE' : macro
redefinition
e:\testreg\regexpr2.cpp(57) : see previous definition of 'REGEXPR_H_INLINE'
e:\testreg\regexpr2.cpp(64) : error C2006: '#include' : expected a filename,
found 'identifier'
e:\testreg\regexpr2.cpp(151) : warning C4005: 'REGEX_DECL_CTYPE' : macro
redefinition
e:\testreg\regexpr2.cpp(100) : see previous definition of 'REGEX_DECL_CTYPE'
e:\testreg\regexpr2.cpp(198) : warning C4005: 'REGEX_DEBUG_HEAP' : macro
redefinition
e:\testreg\regexpr2.cpp(196) : see previous definition of 'REGEX_DEBUG_HEAP'
e:\testreg\regexpr2.cpp(1883) : warning C4005: 'DECLARE_RECURSIVE_MATCH_ALL'
: macro redefinition
e:\testreg\regexpr2.cpp(1777) : see previous definition of
'DECLARE_RECURSIVE_MATCH_ALL'
e:\testreg\regexpr2.cpp(1919) : warning C4005:
'DECLARE_ITERATIVE_MATCH_THIS' : macro redefinition
e:\testreg\regexpr2.cpp(1804) : see previous definition of
'DECLARE_ITERATIVE_MATCH_THIS'
e:\testreg\regexpr2.cpp(1935) : warning C4005:
'DECLARE_ITERATIVE_REMATCH_THIS' : macro redefinition
e:\testreg\regexpr2.cpp(1821) : see previous definition of
'DECLARE_ITERATIVE_REMATCH_THIS'
e:\testreg\regexpr2.cpp(6297) : warning C4005: 'REGEX_TO_INSTANTIATE' :
macro redefinition
e:\testreg\regexpr2.cpp(6294) : see previous definition of
'REGEX_TO_INSTANTIATE'
e:\testreg\regexpr2.cpp(6325) : fatal error C1010: unexpected end of file
while looking for precompiled header directive
testreg.cpp
Generating Code...
Build log was saved at "file://e:\testreg\Debug\BuildLog.htm"
testreg - 2 error(s), 7 warning(s)

if I added all of those, there will be a lot of errors also.

i googled it, found only one result in experts-exchange, which the
one said he fixed it by adding some files into his project.
but i missed it no matter what i do.

> In general, if you have a question for one person, it's better to send
> it to that one person instead of a huge distribution list.

no offensive here, i replied you, but failed. so i posted it again here.
thanks for your patientness.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk