I did #include <boost/regex.hpp> as the first include statement. I'm the only one writing this program. I haven't defined a macro "test" anywhere. I even grepped for 'test' and found it only used as the BASH command "test" in configure and Makefile files (automatically generated from autotools). On Wed 22 May 2013 08:53:31 AM PDT, John Maddock wrote:
# /usr/local/include/boost/regex/v4/regex_format.hpp:849:1: error: macro "test" passed 2 arguments, but # takes just 1
Any ideas why this occurs? Maybe it's because I'm not including -lbooost_regex as a compile option? I specified it as my "myproject_LDADD" macro in Makefile.am so I assume g++ knows when to use it.
Yes you need to add -lboost_regex as a *linker* option, but the error is occuring because someone has defined "test" as a macro which is a very very bad idea! Try making boost/regex.hpp the first #include.
HTH, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users