解決ROS kinetic 編譯baxter_simulator 出現usr/include/boost/type_traits/detail/has_binary_operator錯誤

在Ubuntu 16 安裝的 ROS kinetic編譯baxter_simulator 出現如下錯誤

usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
baxter_simulator/baxter_sim_io/CMakeFiles/baxter_sim_io.dir/build.make:96: recipe for target 'baxter_simulator/baxter_sim_io/include/baxter_sim_io/moc_baxter_io.cxx' failed
make[2]: *** [baxter_simulator/baxter_sim_io/include/baxter_sim_io/moc_baxter_io.cxx] Error 1
CMakeFiles/Makefile2:4428: recipe for target 'baxter_simulator/baxter_sim_io/CMakeFiles/baxter_sim_io.dir/all' failed
make[1]: *** [baxter_simulator/baxter_sim_io/CMakeFiles/baxter_sim_io.dir/all] Error 2
make[1]: *** 正在等待未完成的任務....

解決方案

sudo gedit /usr/include/boost/type_traits/detail/has_binary_operator.hpp

namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
...
} // namespace impl

修改爲

#ifndef Q_MOC_RUN
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
#endif

...

#ifndef Q_MOC_RUN
} // namespace impl
#endif

就好啦

發佈了114 篇原創文章 · 獲贊 59 · 訪問量 20萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章