Closed cdellin closed 9 years ago
Does this header guard affect future compatibility with QT 5.0+?
No, the moc meta-compiler does not need access to any of the OpenRAVE stuff, now or going forward. There are lots of reports of this type of workaround being necessary even with Qt 5 (e.g. [0]), albeit for different offenders in Boost. [0] https://forum.qt.io/topic/22458/semi-solved-qt5-moc-error-in-combination-with-boost
Ok, that seems reasonable then.
Can we put normal indentation before the nested #include
? Requiring lines to start with #
is a holdover from pre-ANSI C.
@psigen is correct. Indenting pre-processing directives is allowed in both C90 and C99.
@jeking04 confirmed that this doesn't break anything on 14.04, so I am happy to merge this as soon as @cdellin fixes the spacing. :smile:
I used four spaces for indentation. I thought that might make y'all happy.
:+1: Thanks @cdellin and @jeking04!
@cdellin: I would have preferred 3.5 space indention. But we can't always get what we want. :frowning:
On my system,
or_rviz
fails to compile with:This is a known bug with Qt Moc (see [0]) before Qt 5.0 that apparently affects class definitions that include some version of boost's BOOST_JOIN macro. This apparently includes my system. I'm using the latest OpenRAVE, Qt 4.8, and Boost 1.49.0 on Debian Wheezy.
I was able to fix the issue on my system by applying the suggested workaround from the linked bug report. This PR adds the workaround.
[0] https://bugreports.qt.io/browse/QTBUG-22829