I like to use SciTE.exe sometimes and here is the output of what you have:
>g++ -pedantic -Os regex.cc -o regex
regex.cc:1:17: regex: No such file or directory
regex.cc: In function `int main()':
regex.cc:8: error: `regex' does not name a type
regex.cc:11: error: `r' was not declared in this scope
regex.cc:11: error: `regex_match' was not declared in this scope
>Exit code: 1
That is probably due to my installation still being C:\MinGW\include\c++\3.4.5
I looked for that header in there and is not present. You must have it
then in 4.4?
On 3/17/10, Jean He <wearjeanhe@...> wrote:
> Hi all:
> I download MinGW with g++ 4.4, and I can't wait to try it.
> I write a sample cpp like this:
> #include <regex>
> #include <string>
> #include <iostream>
> using namespace std;
> int main()
> const regex r("[1-9]*x[2-9]+");
> for (string s; getline(cin, s); )
> cout << (regex_match(s, r) ? "Yes" : "No") << endl;
> return 0;
> After I build it, some errors are thrown, I don't know if I miss some
> options or...
> D:\MinGW_Env\Code>g++ -std=c++0x regex.cpp -o regex.exe
> In file included from
> from regex.cpp:1:
> error: '::swprintf' has not been declared
> error: '::vswprintf' has not been declared
> Can you please help me figure out what's wrong in above process, thank you
> very much in advance.
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> MinGW-users mailing list
> This list observes the Etiquette found at
> We ask that you be polite and do the same. Disregard for the list
> etiquette may cause your account to be moderated.
> You may change your MinGW Account Options or unsubscribe at: