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

Parse error at "BOOST_JOIN"

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

inflo gravatar image

updated 2022-01-22 16:16:32 -0600

Evgeny 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 image The Martin  ( 2016-06-01 02:37:34 -0600 )edit

I have the same problem as well :-(

Markus Bader gravatar image Markus Bader  ( 2016-06-27 03:17:00 -0600 )edit

Hello, Did you fix it?

pmarinplaza gravatar image pmarinplaza  ( 2016-10-05 08:14:21 -0600 )edit

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

zhaoyang gravatar image zhaoyang  ( 2016-10-11 05:58:56 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

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

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 image bonzi  ( 2017-01-19 19:48:27 -0600 )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 image Tones  ( 2017-07-18 08:41:55 -0600 )edit

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

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 image Avio  ( 2018-07-04 05:28:58 -0600 )edit

worked for me on Ubuntu 18.04

Pedro Machado gravatar image Pedro Machado  ( 2020-01-08 13:07:29 -0600 )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 -0600

Seen: 11,208 times

Last updated: Oct 05 '16