ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

Parse error at "BOOST_JOIN"

asked 2016-05-06 09:59:19 -0500

inflo gravatar image

i use ubuntu 16.04 and kinetic kame, when i try to build a package, it returns:

usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"

someone knows something about it ?

edit retag flag offensive close merge delete



I have the same problem. According to this thread at stackoverflow it might be because of mismatching Boost and QT versions.

The Martin gravatar imageThe Martin ( 2016-06-01 02:37:34 -0500 )edit

I have the same problem as well :-(

Markus Bader gravatar imageMarkus Bader ( 2016-06-27 03:17:00 -0500 )edit

Hello, Did you fix it?

pmarinplaza gravatar imagepmarinplaza ( 2016-10-05 08:14:21 -0500 )edit

i have the same problem when i try rgbdslam-v2.;-( ubuntu 16.04

zhaoyang gravatar imagezhaoyang ( 2016-10-11 05:58:56 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-10-05 08:58:03 -0500

pmarinplaza gravatar image

I just fixed adding as "The Martin" said:

In qnode.cpp:

#ifndef Q_MOC_RUN
#include <ros/ros.h>
#include "../include/testpackage/qnode.hpp"
#include <ros/network.h>
edit flag offensive delete link more



Did you add a separate qnode.cpp file, or the file was exisiting, and you edited it??

bonzi gravatar imagebonzi ( 2017-01-19 19:48:27 -0500 )edit

As an addition: The #ifndef Q_MOC_RUN .. #endif statement has to encapsulate all ros- and boost-related includes in your code. It should not encapsulate Qt or STL-includes.

Tones gravatar imageTones ( 2017-07-18 08:41:55 -0500 )edit

answered 2017-11-06 20:20:56 -0500

lhz gravatar image The steps: 1. sudo gedit /usr/include/boost/type_traits/detail/has_binary_operator.hpp 2. Modify "namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {...}" to " #ifndef Q_MOC_RUN namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { #endif .... #ifndef Q_MOC_RUN } #endif "

edit flag offensive delete link more


On my Ubuntu 16.04 with Kinetic, it worked like a charm, thank you! Here is a patch for anybody stumbling in this issue.

Avio gravatar imageAvio ( 2018-07-04 05:28:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-05-06 09:59:19 -0500

Seen: 7,289 times

Last updated: Oct 05 '16