jacknlliu / development-issues

Some issues from my development
MIT License
7 stars 1 forks source link

Gazebo7 Build with boost 1.58.0 error #3

Open jacknlliu opened 6 years ago

jacknlliu commented 6 years ago

Follow Build with boost 1.58.0 error.

When we compile gaebo7 with Oculus support, we got the following errors

usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
gazebo/gui/CMakeFiles/gazebo_gui.dir/build.make:127: recipe for target 'gazebo/gui/moc_MainWindow.cxx' failed
make[2]: *** [gazebo/gui/moc_MainWindow.cxx] Error 1
make[1]: *** [gazebo/gui/CMakeFiles/gazebo_gui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Solution: Note: I have made a pull request for gazebo, please see gazebo pull request #2788.

modify file gazebo/gui/OculusWindow.hh, add Q_MOC_RUN macro.

gazebo/gui/OculusWindow.hh:

#ifndef _GAZEBO_OCULUS_WINDOW_HH_
#define _GAZEBO_OCULUS_WINDOW_HH_

#ifndef Q_MOC_RUN
#include <boost/thread.hpp>
#endif
#include <string>

#ifndef Q_MOC_RUN
#include "gazebo/transport/TransportTypes.hh"
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/msgs/msgs.hh"
#include "gazebo/gui/qt.h"
#endif

then recompile gazebo.

Reference

jacknlliu commented 6 years ago

Resolved. I have made a pull request for gazebo, please see gazebo pull request #2788