[ros-users] Reserved message names?
Troy D Straszheim
troy at resophonic.com
Mon Aug 16 22:13:58 UTC 2010
On Mon, Aug 16, 2010 at 02:53:00PM -0700, Brian Gerkey wrote:
> Date: Mon, 16 Aug 2010 14:53:00 -0700
> From: Brian Gerkey <gerkey at willowgarage.com>
> To: ros-users at code.ros.org
> Subject: Re: [ros-users] Reserved message names?
>
> On Fri, Aug 13, 2010 at 11:19 AM, Brian Gerkey <gerkey at willowgarage.com> wrote:
> > To test Josh's hypothesis, you can try compiling with '-U Status', to
> > undefine any previous definition of that symbol.
> >
> > E.g., if you're building an executable called 'bookboot', you could
> > add this line to your CMakeLists.txt:
> >
> > rosbuild_add_compile_flags(bookboot -U Status)
> >
> > If that works (with your message still called 'Status'), then you'd
> > want to track down the #define of 'Status'.
>
> As Josh pointed out, the above test won't actually work, because the
> command-line -D and -U options are processed before the source files.
> Instead, you can try *defining* Status on the command line to
> something unusual, then look for a compiler warning about
> redefinition. E.g.:
>
CMake generates preprocess targets which might be handy here:
% cd build
% ls
CMakeCache.txt CMakeFiles/ Makefile cmake_install.cmake
% make help | grep \\.i
... src/add_two_ints_client.i
... src/add_two_ints_server.i
... src/listener.i
... src/talker.i
% make src/talker.i
Preprocessing CXX source to CMakeFiles/talker.dir/src/talker.i
then inspect CMakeFiles/talker.dir/src/talker.i, all the good stuff is
in there
-t
More information about the ros-users
mailing list