2

after gcc upgrade my project fails to build due to the error:

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 "("

What could it be? I've also tried latest gcc (4.8) snapshot but it didn't help.

p.s.

extra/boost 1.49.0-1 [installed]
core/gcc 4.6.3-1 (base-devel) [installed]
aurbuild/luabind 0.9.1-1 [installed]
5
  • 2
    Could you please provide minimal code around at least one of the cases for which the error is output? Commented Mar 9, 2012 at 9:54
  • @izomorphius the error isn't related to my code. I've removed luabind and downloaded latest stable release. I can't build it due to this errors in given files (from error output). Commented Mar 9, 2012 at 9:57
  • 1
    all these lines where you get an error are similar to #elif BOOST_PP_ITERATION_FLAGS() == 1 Commented Mar 9, 2012 at 10:09
  • I have changed the summary of your question to make it easier to find it if one searches for the error. Commented Mar 9, 2012 at 12:01
  • And if your search arrives at this page, but you got this error without boost, see here for a more general explanation of the message. Commented Feb 27, 2014 at 12:02

1 Answer 1

8

As luabind is present as a google google project I was able to browse the code and find which lines are causing the error. They all look like:

#elif BOOST_PP_ITERATION_FLAGS() == 1

It seems others have run into this problem and I found this thread that I hope will help you.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks. Maybe, you know how to fix it: #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, <luabind/wrapper_base.hpp>, 1)) I have never worked with this macro from BOOST.
As far as I see it the guy simply changes an elif to else if and this seems to fix the problem. Doesn't it work for you?
In wrapper_base.hpp, after adding #else and #if around line 93, you need to add an extra #endif at the end of the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.