Problems with Cygwin/g++ and boost::spirit
I am using Cygwin's g++ 3.4.4 and the official Cygwin Boost package
version 1.33.1. This minimal programm
using namespace boost::spirit;
rule< > r;
r = real_p;
bool b = parse(inp.c_str(),r,space_p).full;
produces the following error:
g++ -c -o objs/src/Main.o -D__cygwin__ -O -Isrc -Ilibutil/include
-Ilibrsrc/include src/Main.cpp
/usr/include/boost/spirit/core/scanner/impl/skipper.ipp:173:
instantiated from `boost::spirit::parse_info
Heya, I'm working on a product for a very limited platform and I'd prefer to have as few "extra" C++-features enabled as possible. Specifically, I'd prefer not to have exceptions enabled, because I have no use for them right now. It's nice that the boost library comes with the BOOST_NO_EXCEPTIONS-option, but when the compiler (Metroworks CodeWarrior) reaches any try/catch-blocks that for some reason still linger in the code even with the option enabled, I get an error. Right now I'm only having trouble with the boost::function library, but after a quick search I know that there are quite a few try/catch-blocks in the source... So, is there any way (preferably besides manually editing the headers) to bypass the blocks? I've looked at hacks such as using the preprocessor to redefine the try and catch keywords, but I can't get it through catch (...)-statements. Shouldn't BOOST_NO_EXCEPTIONS remove _all_ the code that has to do with exception handling? /Olle
on Mon Jul 09 2007, Olle Håkansson
So, is there any way (preferably besides manually editing the headers) to bypass the blocks? I've looked at hacks such as using the preprocessor to redefine the try and catch keywords, but I can't get it through catch (...)-statements. Shouldn't BOOST_NO_EXCEPTIONS remove _all_ the code that has to do with exception handling?
Only for Boost libraries whose authors chose to support the nonstandard language called "C++ without exceptions." :) -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
Patrick Gräbel wrote:
I am using Cygwin's g++ 3.4.4 and the official Cygwin Boost package version 1.33.1. This minimal programm
using namespace boost::spirit; rule< > r; r = real_p; bool b = parse(inp.c_str(),r,space_p).full;
produces the following error:
[snip]
Using the parser expression directly works without problems:
bool b = parse(inp.c_str(),real_p,space_p).full;
What am I doing wrong?
See Faq 1. BTW, the Spirit mailing list is: https://lists.sourceforge.net/lists/listinfo/spirit-general Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
participants (4)
-
David Abrahams
-
Joel de Guzman
-
Olle Håkansson
-
Patrick Gräbel