我决定学习 Boost Spirit 并开始在这里学习外观。但是,我很失望,因为第一个示例calc1.cpp没有在我的计算机上编译,它给出了以下错误消息:
calc1.cpp: In constructor ‘client::calculator<Iterator>::calculator()’:
calc1.cpp:43:13: error: ‘uint_type’ is not a member of ‘client::qi’
calc1.cpp:43:27: error: expected ‘;’ before ‘uint_’
calc1.cpp:60:17: error: ‘uint_’ was not declared in this scope
calc1.cpp:60:17: note: suggested alternatives:
/usr/include/boost/spirit/home/support/common_terminals.hpp:134:1: note: ‘boost::spirit::uint_’
/usr/include/boost/spirit/home/support/common_terminals.hpp:134:1: note: ‘boost::spirit::tag::uint_’
/usr/include/boost/spirit/home/support/common_terminals.hpp:134:1: note: ‘boost::spirit::uint_’
我添加了这样的一行,但这不是解决方案:
#include <boost/spirit/home/support/common_terminals.hpp>
我该怎么办?提前致谢。