2012-10-17 59 views
0

我決定學習升壓靈就開始學看here。但是,我很失望,因爲第一個示例calc1.cpp不是我的電腦上編譯和它給此錯誤消息:這個Boost Spirit例子爲什麼不編譯?

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> 

我應該怎麼辦?提前致謝。

+2

什麼是你提升版本?這個例子是從1.51和它,當然,彙編了1.51:http://liveworkspace.org/code/0218209d4c3f7475daae44754d4891a6 – Cubbi

+0

我這是我想不是1.51的最新精神。我如何將它翻譯成最新版本,任何想法? –

+0

升壓/精神的最新版本是1.51.0,除非你使用的1.52.0.beta1。 '/ usr/include/boost/version.hpp'中'BOOST_VERSION'的值是什麼? –

回答