ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
9

Parse error at "BOOST_JOIN"

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

inflo gravatar image

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

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

Comments

2

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 -0500 )edit

I have the same problem as well :-(

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

Hello, Did you fix it?

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

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

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

2 Answers

Sort by ยป oldest newest most voted
6

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>
#endif
edit flag offensive delete link more

Comments

2

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 -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 image Tones  ( 2017-07-18 08:41:55 -0500 )edit
3

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

lhz gravatar image

http://blog.csdn.net/h321654/article/... 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

Comments

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 -0500 )edit

worked for me on Ubuntu 18.04

Pedro Machado gravatar image Pedro Machado  ( 2020-01-08 13:07:29 -0500 )edit

Question Tools

3 followers

Stats

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

Seen: 11,532 times

Last updated: Oct 05 '16