How do you Build ROS nodes on Windows using C++ Builder?

asked 2014-06-19 23:03:57 -0600

dak gravatar image

updated 2014-06-20 01:39:46 -0600

gvdhoorn gravatar image

I'm trying to build the simple talker/listener demo on Windows using Embarcadero (formerly Borland) C++ Builder XE6. The compiler keeps blowing up (Internal Compiler Error) when I try to compile talker.cpp. It crashes in forwards.h, a ROS header.

I was able to successfully build both talker and listener using MSVC 2010, and they worked, so I feel confident I installed win_ros and all its files correctly on Windows.

Can anyone suggest project settings, #defines, or anything else that might help? I want to use C++ Builder for this project because there are some built in components that I'd really like to use.

I'm using win_ros hydro on Windows 7.

Below is the relevant portion of forwards.h with the failing line noted:

struct SubscriberCallbacks
{
  SubscriberCallbacks(const SubscriberStatusCallback& connect = SubscriberStatusCallback(),
                               const SubscriberStatusCallback& disconnect = SubscriberStatusCallback(),
                               const VoidConstPtr& tracked_object = VoidConstPtr(),
                              CallbackQueueInterface* callback_queue = 0)
  : connect_(connect)
  , disconnect_(disconnect)
  , callback_queue_(callback_queue)
  {
    has_tracked_object_ = false;
    if (tracked_object)    // *** this is the line C++ Builder says causes the internal compiler error ***
    {
      has_tracked_object_ = true;
      tracked_object_ = tracked_object;
    }
  }
  SubscriberStatusCallback connect_;
  SubscriberStatusCallback disconnect_;

  bool has_tracked_object_;
  VoidConstWPtr tracked_object_;
  CallbackQueueInterface* callback_queue_;
};
typedef boost::shared_ptr<SubscriberCallbacks> SubscriberCallbacksPtr;

Also, for reference, how do you post code and maintain the formatting? I had to add < b r > just to get newlines.

edit retag flag offensive close merge delete

Comments

The formatting options are accessible through the toolbar at the top of the editing textbox. For code, use the 'preformatted' button (the one with the 1's and 0's). Alternatively, just prefix all lines of your block with four spaces.

gvdhoorn gravatar image gvdhoorn  ( 2014-06-20 01:42:21 -0600 )edit