Regex Libraries giving errors
Hi, I am trying to use the regex library (regex_match in particular) I included "boost/regex.hpp". I get the following errors when compiling my code. g++ -W -Wall -Wpointer-arith -O3 -g -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -I/usr/local/ACE_wrappers -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I/usr/local/ACE_wrappers -I/usr/local/include -I/usr/local/include/boost-1_31 -DACE_NTRACE=1 -D__USE_REG_EXPR -c -o .obj/FTP_Task.o FTP_Task.cpp In file included from /usr/local/include/boost-1_31/boost/cregex.hpp:30, from /usr/local/include/boost-1_31/boost/regex/v4/regex.hpp:25, from /usr/local/include/boost-1_31/boost/regex.hpp:34, from FTP_Task.h:19, from FTP_Task.cpp:1: /usr/local/include/boost-1_31/boost/regex/v4/cregex.hpp:75: error: syntax error before numeric constant /usr/local/include/boost-1_31/boost/regex/v4/cregex.hpp:96: error: ISO C++ forbids declaration of `reg_comp_flags' with no type /usr/local/include/boost-1_31/boost/regex/v4/cregex.hpp:100: error: syntax error before numeric constant /usr/local/include/boost-1_31/boost/regex/v4/cregex.hpp:103: error: ISO C++ forbids declaration of `reg_exec_flags' with no type make[1]: *** [.obj/FTP_Task.o] Error 1 make[1]: Leaving directory `/home/bipuser/nBIP-9.0/src' make: *** [NBIP] Error 2 Can sme please shed some light on the problem. I am only using the regex_match function. I create an expression object, and use regex_match to match against it. Thanks in advance for any help. Corey
I am trying to use the regex library (regex_match in particular) I included "boost/regex.hpp". I get the following errors when compiling my code.
Can sme please shed some light on the problem. I am only using the regex_match function. I create an expression object, and use regex_match to match against it.
Thanks in advance for any help.
I suspect that you are including the platforms
John Maddock wrote:
I am trying to use the regex library (regex_match in particular) I included "boost/regex.hpp". I get the following errors when compiling my code.
Can sme please shed some light on the problem. I am only using the regex_match function. I create an expression object, and use regex_match to match against it.
Thanks in advance for any help.
I suspect that you are including the platforms
(possibly indirectly) before including . That currently causes conflicts: there is a fix in the works, but it involves a complete restructuring of Boost.Regex that won't be released until Boost-1.33 (that's the release after next). John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I just check my includes. I only include "boost/filesystem/operations.hpp", boost/filesystem/path.hpp, and boost/regex.hpp. I didn't see where the filesystem headers include regex headers. So I don't think that I am including regex.h before regex.hpp.
I just check my includes. I only include "boost/filesystem/operations.hpp", boost/filesystem/path.hpp, and boost/regex.hpp. I didn't see where the filesystem headers include regex headers. So I don't think that I am including regex.h before regex.hpp.
You will probably have to preprocess your source to figure out what's
including it. There is no fix at present, except to prevent it's inclusion
before
John Maddock wrote:
I just check my includes. I only include "boost/filesystem/operations.hpp", boost/filesystem/path.hpp, and boost/regex.hpp. I didn't see where the filesystem headers include regex headers. So I don't think that I am including regex.h before regex.hpp.
You will probably have to preprocess your source to figure out what's including it. There is no fix at present, except to prevent it's inclusion before
. What platform are you on BTW? John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I am on Fedora Core 2. Ok I will try that and see what happens. Thanks again. I hope this will solve it, because I really need this for a project at work. :)
John Maddock wrote:
I just check my includes. I only include "boost/filesystem/operations.hpp", boost/filesystem/path.hpp, and boost/regex.hpp. I didn't see where the filesystem headers include regex headers. So I don't think that I am including regex.h before regex.hpp.
You will probably have to preprocess your source to figure out what's including it. There is no fix at present, except to prevent it's inclusion before
. What platform are you on BTW? John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I ran my source through the preprocessor, and saw that some of my ACE headers were including regex.h I rearrange the headers so that boost headers were included first, and my source compiled. Thanks very much for the heads up.
participants (2)
-
Corey M. Ellis
-
John Maddock