在cmake期间提升连接时发生prase错误

时间:2017-05-25 07:44:49

标签: c++

我想使用Qt为ROS平台开发UI。但是当我尝试在Catkin工作区中运行cmake时,终端中会出现以下错误:

####
#### Running command: "make cmake_check_build_system" in "/home/prabin/QT_point/rosqt_ws/build"
#### Running command: "make -j4 -l4" in "/home/prabin/QT_point/rosqt_ws /build"
####
[  4%] Generating include/qtros/moc_main_window.cxx
[  9%] Generating include/qdude/moc_qnode.cxx
[ 13%] Generating include/qdude/moc_main_window.cxx
[ 18%] Generating include/qtros/moc_qnode.cxx

usr / include / boost / type_traits / detail / has_binary_operator.hp:50:解析“BOOST_JOIN”错误 qdude / CMakeFiles / qdude.dir / build.make:77:目标'qdude / include / qdude / moc_qnode.cxx'的配方失败

知道这是什么问题吗?

screenshot

1 个答案:

答案 0 :(得分:0)

此错误 - usr / include / boost / type_traits / detail / has_binary_operator.hp:50:当我尝试将ROS Kinetic集成到Qt中时,发生“BOOST_JOIN”的解析错误。

可以通过在.h或.hpp文件中的包含之间添加以下2行来解决此问题

#ifndef Q_MOC_RUN
#endif