On Thu, Jun 28, 2012 at 11:15:13AM -0400, Pramod Subramanyan wrote:
I am trying to use boost/property_tree/ptree.hpp in my application. All I have done so far is just add the following include statements to my program:
#include
#include After adding these lines, I compiled my modified application using g++ 4.6.3 on Ubuntu 12.04. I get the following errors:
g++ -c -Wall -Werror -I../cudd-2.4.2//include/ -I /home/pramod/libraries/boost_1_50_0/ -O2 -Wno-unused-result -Wno-unused-function -c -o main.o main.cpp
When I look the lines117 and 191 in ptree.hpp, they are the following:
s >> e; if(s.fail()) { // Try again in word form.
and customized::extract(iss, e); if(iss.fail() || iss.bad() || iss.get() != Traits::eof()) { return boost::optional<E>();
I can't spot anything obviously wrong with either of these lines.
Does anyone have any clues on what could be going wrong?
When you get mysterious errors like that, it's probably due to some less responsible entity defining macros that collide with valid names in your code. In this case, I'd expect that someone has "helpfully" made a "fail" macro. Preprocess your code (pass -E to your compiler) and look at the true source the compiler sees. -- Lars Viklund | zao@acc.umu.se