2012-03-09 55 views
2

GCC升級後我的項目構建失敗是由於錯誤:錯誤:之前令牌丟失的二進制運算符「(」

In file included from /usr/include/luabind/wrapper_base.hpp:31:0, 
       from /usr/include/luabind/back_reference.hpp:27, 
       from /usr/include/luabind/class.hpp:93, 
       from /usr/include/luabind/luabind.hpp:28, 
       from /home/ockonal/Workspace/themisto/engine/include/Scripting/ScriptManager.hpp:21, 
       from /home/ockonal/Workspace/themisto/engine/source/Core/Root.cpp:28: 
/usr/include/luabind/detail/call_member.hpp:319:1: error: missing binary operator before token "(" 
In file included from /usr/include/luabind/back_reference.hpp:27:0, 
       from /usr/include/luabind/class.hpp:93, 
       from /usr/include/luabind/luabind.hpp:28, 
       from /home/ockonal/Workspace/themisto/engine/include/Scripting/ScriptManager.hpp:21, 
       from /home/ockonal/Workspace/themisto/engine/source/Core/Root.cpp:28: 
/usr/include/luabind/wrapper_base.hpp:92:1: error: missing binary operator before token "(" 
In file included from /usr/include/luabind/function.hpp:10:0, 
       from /usr/include/luabind/class.hpp:94, 
       from /usr/include/luabind/luabind.hpp:28, 
       from /home/ockonal/Workspace/themisto/engine/include/Scripting/ScriptManager.hpp:21, 
       from /home/ockonal/Workspace/themisto/engine/source/Core/Root.cpp:28: 
/usr/include/luabind/detail/call_function.hpp:326:1: error: missing binary operator before token "(" 
In file included from /usr/include/luabind/detail/constructor.hpp:12:0, 
       from /usr/include/luabind/class.hpp:96, 
       from /usr/include/luabind/luabind.hpp:28, 
       from /home/ockonal/Workspace/themisto/engine/include/Scripting/ScriptManager.hpp:21, 
       from /home/ockonal/Workspace/themisto/engine/source/Core/Root.cpp:28: 
/usr/include/luabind/wrapper_base.hpp:92:1: error: missing binary operator before token "(" 
In file included from /usr/include/luabind/class.hpp:107:0, 
       from /usr/include/luabind/luabind.hpp:28, 
       from /home/ockonal/Workspace/themisto/engine/include/Scripting/ScriptManager.hpp:21, 
       from /home/ockonal/Workspace/themisto/engine/source/Core/Root.cpp:28: 
/usr/include/luabind/detail/call_member.hpp:319:1: error: missing binary operator before token "(" 

什麼也可能是我也嘗試最新的gcc(4.8)快照,但?它並沒有幫助

PS

extra/boost 1.49.0-1 [installed] 
core/gcc 4.6.3-1 (base-devel) [installed] 
aurbuild/luabind 0.9.1-1 [installed] 
+1

能否請您至少提供一個輸出錯誤的案例的最小代碼? – 2012-03-09 09:54:23

+0

@izomorphius該錯誤與我的代碼無關。我已經刪除了luabind並下載了最新的穩定版本。由於給定文件中的錯誤(來自錯誤輸出),我無法構建它。 – Ockonal 2012-03-09 09:57:23

+1

所有這些行出現錯誤的地方都類似於'#elif BOOST_PP_ITERATION_FLAGS()== 1' – 2012-03-09 10:09:25

回答

8

由於luabind存在作爲谷歌google project我能夠瀏覽代碼並發現其行導致錯誤,他們看起來都像:。

#elif BOOST_PP_ITERATION_FLAGS() == 1 

看來其他人已經遇到了這個問題,我發現這thread,我希望能幫助你。

+0

謝謝。也許,你知道如何解決它:'#define BOOST_PP_ITERATION_PARAMS_1(4,(0,LUABIND_MAX_ARITY,,1))'我從來沒有使用BOOST這個宏。 – Ockonal 2012-03-09 10:38:04

+1

據我所知,這傢伙只是簡單地改變一個ELIF,如果這似乎解決了這個問題。它不適合你嗎? – 2012-03-09 10:44:34

+0

就是這樣,謝謝;) – Ockonal 2012-03-09 11:23:52

相關問題