|
Boost Users : |
Subject: [Boost-users] Some of Boost Regex++ not recognized
From: lsimons (lsimons_at_[hidden])
Date: 2009-06-26 09:06:12
<hoping this isn't a double post. Had some trouble with connection first
time>
I really appreciate the work done on the Boost libraries. I've used them in
other projects and it's always been a welcome relief. For my current
project, I'm trying to use the Boost Regex++ library in MSVC++ 6.0 (under
Vista) to do some basic regex. I've installed the libraries as per the
tutorial and added the Boost path to my compiler and linker includes. A
lost of the basic functionality works fine, but I'm having trouble with
autocompletion. The bigger issue is that certain parts of the library seem
to throw the compiler.
Ex that comiples fine:
#include "stdafx.h"
#include <boost/regex.hpp>
#include <string.h>
using namespace std;
using namespace boost;
int main(int argc, char* argv[])
{
regex expr("^&[a-zA-Z0-9_ ]+,\\s+[a-zA-Z0-9_ ]+,\\s+[0-9].+");
string text = "&AirSpeed_Error, tla_error, 2 \\test
stuff";
bool result;
result = regex_match(text,expr);
if (result == true)
cout << "Match" << endl;
else
cout << "No Match" << endl;
return 0;
}
If I add the line "match_flag_type flags = match_default;" I receive three
errors:
C:\Users\me\Documents\test\test.cpp(30) : error C2065: 'match_flag_type' :
undeclared identifier
C:\Users\me\Documents\test\test.cpp(30) : error C2146: syntax error :
missing ';' before identifier 'flags'
C:\Users\me\Documents\test\test.cpp(30) : error C2065: 'flags' : undeclared
identifier
Error executing cl.exe.
I think I might simply have something misconfigured in MSVC6, and I would
appreciate any comments or suggestions towards resolving the issue. Please
let me know if there's any additional info I can provide.
Thanks,
Louis
-- View this message in context: http://www.nabble.com/Some-of-Boost-Regex%2B%2B-not-recognized-tp24219036p24219036.html Sent from the Boost - Users mailing list archive at Nabble.com.
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