1. 程式人生 > >luabind 0.9.1在boost 1.49+和gcc-4.6.3以上版本的編譯問題處理

luabind 0.9.1在boost 1.49+和gcc-4.6.3以上版本的編譯問題處理

將boost更新到1.53時, 發現luabind死活編譯不過, 報錯如下

error: missing binary operator before token "("

根據老外的描述, boost中的BOOST_PP_ITERATION_FLAGS從1.49版本後發生了一些變化.

在git找到一個patch, 連結在此

以下簡單描述

修改call_function.hpp, call_member.hpp及wrapper_base.hpp

去掉#elif BOOST_PP_ITERATION_FLAGS() == 1

更換為

#else

#if BOOST_PP_ITERATION_FLAGS() == 1

然後在原始碼底部加一個#endif即可